Nevermind, I think I have figured it out. Thank you.
It's frustrating I cant use the upload modal component out of the box, as I love the way it looks/feels, but at least now I have something to be working with.
i have the directory section working, I have the file pull down and display.
The upload however I still have issues with. the IFileDescriptorAppService doesn't have any methods for the PreUploadInfo, just a create with stream. I could swap it out for a direct rest call, but that seems counter to the ABP design, and if I did I don't understand the interaction between PreUploadInfo and Upload. Is the pre info required?
I have set up a new project on MVc, And I can see the API calls being sent. I think I have a rough ida of how to use these now. I've maaged to get the directory contents out as a DirectoryContentDto.
Is there any way to display the file in question (Assume for the moment that it's a JPG) in the browser? so far everything I have tried just downloads the file, rather than displaying it in the browser.
I'm looking to list the files in the directory as cards, in <img> tags.
I see that most of the comments are abstract.
To fine-tune our documentation and get started steps, we need concrete examples.
Because for me it's very straightforward to kick-start a project.
Imagine that you start a new scratch ASP.NET Core project with Docker, DevExpress, and Identity Server with a tiered architecture, would it be slaphappy?
As a developer in this exact situation, I have a concrete example for you. The File Management Module Documentation does not explain how to install it correctly.
https://docs.abp.io/en/commercial/latest/modules/file-management
There is no mention in here of having to insert the correct connection string (FileManagement), the adjustments to EntityFrameworkCoreModule.cs, the ocelot additions which have to be made as it inserts under FileManagement instead of the module you install it into, and if you install it via Suite having to change the UI if you're on BlazorServer as it loads the wrong one. If I am following a set of installation instructions, I would expect at the end of the instructions to be able to hand it to a test user. It may not be production ready, but it should at least work.
Update: The Doc actually says about the connection string now. May have missed it, or may be a recent edit: "This module uses FileManagement for the connection string name. If you don't define a connection string with this name, it fallbacks to the Default connection string." << But it most definitely does not fall back to the default connection string.
I have no doubt that with access to the source code it would have been clearer to pick up, but as it stands it was incredibly frustrating having to reach out to support after over a week of trying to resolve it ourselves and use up one of the few tickets we have.
I have no doubt that now we have one successful module installed, it'll be more obvious as to what to do for the next one (Looking at Payments next, so hoping it's a similar install process) but i wouldn't describe it as "very straightforward to kick-start a project." Maybe if you was looking for a basic MVC webpage, yes. but the rest of the features? Not really.
The bot automatically closes it, if there's no activity from the ticket owner. @kirotech, I reopened the ticket. and please send an email to info@abp.io if you have such issues. Many people are subscribed to this topic and reading your -personal- problem.
Hey I don't think this problem just for us. I would suggest you to keep tickets open for at least 30 days. Because not everybody has time to respond with technical details in 7 days.
Another suggestion I would like to make. We need private tickets. Because paying customers are paying for support also why all tickets has to be public? Some problems are delicate and includes security questions like we have with your not working oauth openid functionality we have to share our applications configurations publicly this just doesn't make any sense.
Also another thing. I think your support tickets creator filter is privacy problem. If I search @gmail.com I can find emails from your support system database. Also I can find your customers account names. I would suggest to improve that or just remove it from public.
Also another thing how you can improve you support is by providing reliable information when you going to release bug fixes what we found in your abp commercial. As example your abp commercial payments bugs which we reported and had to ask several times which version fix will be included in.
To ask questions privately, you can upgrade to the Enterprise License plan.
I understand your concern about email privacy but that combo box you mention only shows usernames. If the account owner writes his email to the username area then it'll be shown, if he writes his cell phone its shown. if we remove it from there, it's still visible in the question-answer sections. hence this is not a privacy deal.
On the other hand, if you want to see raw and detailed change logs for every release, please check the full change logs document that we recently started to publish https://docs.abp.io/en/commercial/7.1/change-logs/index
We have to pay 10000 for license to get private tickets? Doesn't look like fair offer sorry. Really appreciate your offer, but no thank you
If your user name combo box is fine with you it is 100% fine with me. No worries here. From customer perspective it just looks strange when I search and I find your customers emails and phones. but if there is no problem it is no problem.
I'm not looking for change logs I'm looking for reliable information provided in tickets when bug fix reported going to be released. Do you see the difference?
To further expand on this point.
One response we got from support was
I suggest you consider upgrading your license to get the source code of the modules.: )
Which I understand is very tongue in cheek, and got a chuckle out of me after I'd calmed down a little, but is incredibly frustrating when you are starting out with your product and paid for the ccommercial modules to "jump-start your project" suddenly appears to be not a 1.5/3k investment but a 6/10K?
I imagine the sentiment is the same when it comes to tickets. It appears you're getting what you want, but in reality, not so much.
It's also worth highlighting that your change logs do not include all the changes made at the "ull change logs document". Having to go hunting through GItHub PRs for changes is not okay. An example of this being the recent resolution to authentication tokens expiration and the new override methond (Which is amazing, thank you.)
This is the Microservices Template set up from V7 and upgraded as updates have been released. I've not added any extra references to this module, I don't think I've actually changed anything in it actually.
I assumed they have to be the same, I've manually updated it so that my solution functions again. None of the other solutions threw this error on updating, they all updated across the board, just this SaaS module which doesn't.
Thank you very much. Adding in options.IntrospectAccessToken(); appears to have resolved it, although I'll need to confirm it in the morning when my current token expires :)
Found my solution to the context error post above.,
you need to add in to moduleNameEntityFrameworkCoreModule.cs
context.Services.AddAbpDbContext<FileManagementDbContext>(options =>
{
/* Remove "includeAllEntities: true" to create
* default repositories only for aggregate roots */
options.AddDefaultRepositories(includeAllEntities: true);
});
Configure<AbpDbContextOptions>(options =>
{
options.Configure<FileManagementDbContext>(c =>
{
c.UseSqlServer(b =>
{
b.MigrationsHistoryTable("__FileManagement_Migrations");
});
});
});
and then create a connection string specifcially called FileManagement.
I've pointed it at the table maintained by my existing DBContext, so hopefully that won't cause any issues down the line.
I can however see the files uploaded by different users:
But I cannot see the API request in the console as expected from the posts above. Could this be because I'm using Blazor Server rather than WASM?
I've also noticed a bug, in which if you re-open the upload box after uploading you get a shadow entry still:
Clicking the Browse button once clears the entry but doesn't open the browse structure.
Thank you for the help so far, finally starting to make progress!
I missed a line for the audience when implementing it, That's now been fixed and the page loads. However, after a few moments it throws a new error:
[file-upload_f2322b15-f]: [10:51:08 ERR] An exception was thrown while activating Volo.FileManagement.EntityFrameworkCore.FileManagementDbContext -> λ:Microsoft.EntityFrameworkCore.DbContextOptions`1[[Volo.FileManagement.EntityFrameworkCore.FileManagementDbContext, Volo.FileManagement.EntityFrameworkCore, Version=7.2.2.0, Culture=neutral, PublicKeyToken=null]].
[file-upload_f2322b15-f]: Autofac.Core.DependencyResolutionException: An exception was thrown while activating Volo.FileManagement.EntityFrameworkCore.FileManagementDbContext -> λ:Microsoft.EntityFrameworkCore.DbContextOptions`1[[Volo.FileManagement.EntityFrameworkCore.FileManagementDbContext, Volo.FileManagement.EntityFrameworkCore, Version=7.2.2.0, Culture=neutral, PublicKeyToken=null]].
[file-upload_f2322b15-f]: ---> Volo.Abp.AbpException: No configuration found for Microsoft.EntityFrameworkCore.DbContext, Microsoft.EntityFrameworkCore, Version=7.0.5.0, Culture=neutral, PublicKeyToken=adb9793829ddae60! Use services.Configure<AbpDbContextOptions>(...) to configure it.
[file-upload_f2322b15-f]: at Volo.Abp.EntityFrameworkCore.DependencyInjection.DbContextOptionsFactory.Configure[TDbContext](AbpDbContextOptions options, AbpDbContextConfigurationContext`1 context)
I assume therefore that it is expecting a specific DB context, but it doesn't say anything about implementing that (https://docs.abp.io/en/commercial/latest/modules/file-management) But following the instructions I have the following:
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
using Volo.FileManagement.EntityFrameworkCore;
namespace DragonsHoard.FileUpload.EntityFrameworkCore;
[ConnectionStringName(FileUploadDbProperties.ConnectionStringName)]
public class FileUploadDbContext : AbpDbContext<FileUploadDbContext>
{
public FileUploadDbContext(DbContextOptions<FileUploadDbContext> options)
: base(options)
{
}
protected override void OnModelCreating(ModelBuilder builder)
{
base.OnModelCreating(builder);
builder.ConfigureFileUpload();
builder.ConfigureFileManagement();
}
}
Why isn't it using the context I have set up, and how do I repoint it to use the context I have? If I can't, do I need to set up a second context for the prebuilt?
In case it becomes relevant at all / later I've got it set to push files to DB at the moment.
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper<FileUploadApplicationModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddMaps<FileUploadApplicationModule>(validate: true);
});
Configure<AbpBlobStoringOptions>(options =>
{
options.Containers.ConfigureDefault(c =>
c.UseDatabase());
options.Containers.Configure<FileManagementContainer>(c =>
{
c.UseDatabase(); // You can use FileSystem or Azure providers also.
});
});
}
a)
Please check the permissions of admin user. Please check the logs of api&authserver.
b)
it returns a fault
Please share the details logs.
c)
I guess you need update it yourself. The suite can't handle the microservice very well.
d)
You can override the application services of FM module. See the API request on browser console.
e)
See the file uploda request on browser console.
I suggest you consider upgrading your license to get the source code of the modules.
: )
a) Dropbox link for Auth Logs:https://www.dropbox.com/s/05epchpbe8cfhta/Auth-Server-Logs.txt?dl=0 Dropbox link for File Upload Logs: https://www.dropbox.com/s/5z70tgyme3kqmnn/File-Upload-Logs.txt?dl=0
b)
[blazor_d73061ee-6]: [16:12:49 FTL] DragonsHoard.Blazor terminated unexpectedly! [blazor_d73061ee-6]: Volo.Abp.AbpInitializationException: An error occurred during ConfigureServicesAsync phase of the module Volo.Abp.AspNetCore.Components.WebAssembly.AbpAspNetCoreComponentsWebAssemblyModule, Volo.Abp.AspNetCore.Components.WebAssembly, Version=7.2.1.0, Culture=neutral, PublicKeyToken=null. See the inner exception for details. [blazor_d73061ee-6]: ---> System.InvalidOperationException: Could not find singleton service: Microsoft.AspNetCore.Components.WebAssembly.Hosting.WebAssemblyHostBuilder, Microsoft.AspNetCore.Components.WebAssembly, Version=7.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60 [blazor_d73061ee-6]: at Microsoft.Extensions.DependencyInjection.ServiceCollectionCommonExtensions.GetSingletonInstance[T](IServiceCollection services) [blazor_d73061ee-6]: at Microsoft.Extensions.DependencyInjection.AbpWebAssemblyServiceCollectionExtensions.GetHostBuilder(IServiceCollection services) [blazor_d73061ee-6]: at Volo.Abp.AspNetCore.Components.WebAssembly.AbpAspNetCoreComponentsWebAssemblyModule.ConfigureServices(ServiceConfigurationContext context) [blazor_d73061ee-6]: at Volo.Abp.Modularity.AbpModule.ConfigureServicesAsync(ServiceConfigurationContext context) [blazor_d73061ee-6]: at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync() [blazor_d73061ee-6]: --- End of inner exception stack trace --- [blazor_d73061ee-6]: at Volo.Abp.AbpApplicationBase.ConfigureServicesAsync() [blazor_d73061ee-6]: at Volo.Abp.AbpApplicationFactory.CreateAsync[TStartupModule](IServiceCollection services, Action 1 optionsAction) [blazor_d73061ee-6]: at Microsoft.Extensions.DependencyInjection.ServiceCollectionApplicationExtensions.AddApplicationAsync[TStartupModule](IServiceCollection services, Action 1 optionsAction) [blazor_d73061ee-6]: at Microsoft.Extensions.DependencyInjection.WebApplicationBuilderExtensions.AddApplicationAsync[TStartupModule](WebApplicationBuilder builder, Action 1 optionsAction) [blazor_d73061ee-6]: at DragonsHoard.Blazor.Program.Main(String[] args) in C:\Users\slink\source\repos\Nezuban\DragonsHoard\apps\blazor\src\DragonsHoard.Blazor\Program.cs:line 27
c) I have updated the ocelot to include the file-management url's.
d & e) Could I have a link to this please?
While I'd love to upgrade to get access to the source code, and believe me it's pretty high on our priorites as we know how much not having it is hurting our ability to support ourselves on this, it's just not possible for our startup to get that sort of funding together. We pulled together for the individual commercial licence because we was hoping that the three modules we really needed would function out of the box. So far one has.
We want to, Don't get me wrong. The additional developer seat alone would help us out immensely, but $6k is just way beyond us right now.