3

I have a web-application built with mvc 4, and I want to allow users to upload files. Most of these files are documents(pdf, word etc). I decided to store the files on the server in separated folders (folder per user) and have data in the database on what files are where on the server. The webapplication runs in windows azure (website - Standard) environment.

I'm not sure whether I should store the user files in the (standard MVC folder structure) Content folder or App_Data folder, or somewhere else.

Help is greatly appreciated!

user2713516
  • 2,983
  • 5
  • 23
  • 49
  • 1
    Check [this question](http://stackoverflow.com/questions/1927068/mvc-and-files-uploaded-by-user-where-to-store-files?rq=1). Also, since you are using Azure you may want to take a look at the [blob storage service](http://www.windowsazure.com/en-us/documentation/articles/storage-dotnet-how-to-use-blobs-20/), in this case [this tutorial](http://www.windowsazure.com/en-us/documentation/articles/cloud-services-dotnet-multi-tier-app-storage-1-overview/) might be of help – Daniel J.G. Mar 10 '14 at 15:01
  • thanks ill have a look – user2713516 Mar 11 '14 at 10:14
  • If I would store the files in the app_date folder, is this safe? I dont want users to access these files via some URL. (If I retrieve the files via code I can do authentication there ofcourse) – user2713516 Mar 11 '14 at 10:18
  • If you follow the links to [this other question](http://stackoverflow.com/questions/528858/what-is-the-app-data-folder-used-for-in-visual-studio) and [the msdn](http://msdn.microsoft.com/en-us/library/ex526337.aspx), you will see that _The content of application folders, except for the App_Themes folder, is not served in response to Web requests, but it can be accessed from application code._ – Daniel J.G. Mar 11 '14 at 10:25

0 Answers0