normally this problem will not happe in your production environment. we as developers often recreate database, delete tenants etc. that's why we face this problem.
yes, if you change the database provider, you need to remove all migrations and add again, because each DBMS has its own data limitations. please read https://docs.abp.io/en/abp/latest/Entity-Framework-Core-Other-DBMS
hi @safak, I created a seperate topic for your question https://support.abp.io/QA/Questions/476/
profile picture issue has been resolved in v3.2.1
your credit has been refunded.
I'm trying to find a quick solution as there's no support for streaming from application service. The issue must be solved in the framework. You can track this issue https://github.com/abpframework/abp/issues/5727
hi ricardo,
let's go step by step, if you are changing the database provider, you need to delete all existing migrations and add the migrations for your database provider. see this https://docs.abp.io/en/abp/latest/Entity-Framework-Core-Other-DBMS
see this https://stackoverflow.com/a/42460443/1767482
also application services shouldn't use IFormFile or Stream, use byte[] for files in your application services.
also see this code, this is used to upload a file which is written in a controller
[RemoteService(Name = FileManagementRemoteServiceConsts.RemoteServiceName)]
[Area("fileManagement")]
[ControllerName("FileDescriptors")]
[Route("api/file-management/file-descriptor")]
[Authorize(FileManagementPermissions.FileDescriptor.Default)]
public class FileDescriptorController : AbpController, IFileDescriptorAppService
{
[HttpPost]
[Route("upload")]
[Authorize(FileManagementPermissions.FileDescriptor.Create)]
[ApiExplorerSettings(IgnoreApi = true)]
public virtual async Task<IActionResult> UploadAsync(Guid? directoryId, IFormFile file)
{
if (file == null)
{
return BadRequest();
}
using (var memoryStream = new MemoryStream())
{
await file.CopyToAsync(memoryStream);
var fileDescriptor = await FileDescriptorAppService.CreateAsync(
new CreateFileInput
{
Name = file.FileName,
MimeType = file.ContentType,
DirectoryId = directoryId,
Content = memoryStream.ToArray()
}
);
return StatusCode(201, fileDescriptor);
}
}
}