How to store File Manager files in SQL database
Right now, they go to Azure.
<SfFileManager TValue="FileManagerDirectoryContent" ShowThumbnail="true" AllowDragAndDrop="true" AllowMultiSelection="true">
<FileManagerAjaxSettings Url="https://ej2-azure-aspcore-service.azurewebsites.net/api/AzureFileManager/AzureFileoperations"
UploadUrl="https://ej2-azure-aspcore-service.azurewebsites.net/api/AzureFileManager/AzureUpload"
DownloadUrl="https://ej2-azure-aspcore-service.azurewebsites.net/api/AzureFileManager/AzureDownload"
GetImageUrl="https://ej2-azure-aspcore-service.azurewebsites.net/api/AzureFileManager/AzureGetImage">
</FileManagerAjaxSettings>
</SfFileManager>
Running File Manager on Blazor Server.
Edward
Hi Edward,
Based on the shared details we can understand that you are trying to utilize Syncfusion File Manager component with SQL file provider. We have prepared the sample aligning with your requirements. Kindly refer the code changes below,
|
<SfFileManager TValue="FileManagerDirectoryContent"> <FileManagerAjaxSettings Url=http://localhost:62869/api/SQLProvider/SQLFileOperations UploadUrl=http://localhost:62869/api/SQLProvider/SQLUpload DownloadUrl=http://localhost:62869/api/SQLProvider/SQLDownload GetImageUrl=http://localhost:62869/api/SQLProvider/SQLGetImage> </FileManagerAjaxSettings> </SfFileManager> |
We have attached the sample for your reference,
Sample: Attached as zip file.
File Provider: https://blazor.syncfusion.com/documentation/file-manager/file-system-provider#sql-database-file-system-provider
It is important to note that you have to clone and run the SQL service sample to work on the shared File Manager sample. After running the project, it will be hosted in
and just mapping the ajaxSettings property of the FileManager component to the appropriate controller methods allows to manage the files in the SQL provider.
Kindly check out the shared details and get back to us if you need further assistance.
Regards,
Jafar
Blazor .NET 8 How to store File Manager files in SQL database.
Thanks for the information I received so far.
But I, failed to mention that my SQL 2022 Enterprise instance is running on its own stand-alone server.
It is not local, My Visual Sudio 2022 Enterprise is also on its own server, including my IIS Server.
All servers are behind a Netgate 8200 router.
Here is a copy of my appsettings.json file:
"ConnectionStrings": {
"FileManagerConnection": "Data Source=SQL1\\KXPN1;Initial Catalog=FileManager;Integrated Security=True;Multiple Active Result Sets=True;Encrypt=False;Trust Server Certificate=True"
IJSRuntime JsRuntime;
SfFileManager TValue="FileManagerDirectoryContent" ShowThumbnail="true" AllowDragAndDrop="true" AllowMultiSelection="true">
<FileManagerAjaxSettings Url=http://sql.xpn.net:80/FileManager/SQLFileOperations
UploadUrl=http://sql.xpn.net:80/FileManager/SQLUpload
DownloadUrl=http://sql.xpn.net:80/FileManager/SQLDownload
GetImageUrl=http://sql.xpn.net:80/FileManager/SQLGetImage>
</FileManagerAjaxSettings>
</SfFileManager>
Obviously, this is incorrect.
Thanks so much for the response, I did not think anyone would respond.
Truly amazing
Edward
Hi Edward,
We can understand that you are facing an issue while using the SQL provider. On validating your provided details, we suspect that the issue you are facing might be due to the below cases. We kindly suggest you refer to the below.
Kindly check out the shared details and get back to us if you need further assistance.
Regards,
Jafar