I am working on an asp.net mvc core web application which have Entity framework as the data access layer. and i have a document management module inside our application, where users can upload files such as "MS Office", PDFs, images, etc.. >> then they can set permission for each file >> either public so it is viewable by all registered users OR private to specific users only (where they can select the users from a list of registered users).
now we have 2 ways for storing and managing files inside our asp.net mvc core:-
- store the files inside a folder on our host server
- store the files inside our database.
so i am not sure which approach will be more suitable for us? especially that we have the option to apply custom permissions on each file.. so is it better to store the files inside the database? Also in the future we might allow the end users to specify if they want to encrypt the files as a second level of security.
second question. if i store the files inside the database then can user download the files to their local machines? and view the files using separate urls? Thanks