Base solution for your next web application
Open Closed

File Upload Angular6/AspNetCore, ref in DB/URL example code? #5232


User avatar
0
chauey created

I see there is a file upload UI to "Change profile picture" from the user login dropdown menu, and also another UI to upload multiple files in Demo UI Components. There is some server code DemoUiComponentsController.cs UploadFiles(). How far are these and what are they missing? Wasn't able to upload a profile picture (UPDATE: oh it may have saved to ....Web.Host\wwwroot\Temp\Downloads but i'm having some error updating/viewing it), and not sure the other one stored the file anywhere or referenced in the database.

I need to upload some zip files and reference them. Are there any great examples/guidance how to do this? Not sure all the options on where to store, DB features for storing binary in tables or linked, exposing/securing to be downloaded by tenant or public. A well thought out implementation would be fantastic! Thanks!


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @chauey,

    You can check if the folder on the server side has necessary write permissions or not. For uploading different file types, you need to add related extensions to the client side javascript usage. You can also make a file extension check on the server side.