What is the best way to store files in a web application (asp.net + wcf)

I am building a web application using asp.net and WCF as a three-tier architecture that basically looks like a social website. Users can register in the system, and they can upload images of their profiles, documents, video clips, etc. So what I want to know is the best way to store these files? From the side of wcf or web application?

I also want to know that if I choose the side of the web application to store these files as a set of folders, how does it separate these folders and allow access to another other project (for example, the desktop client should upload files to this shared folder)?

Thanks to everyone in advance.

+3
source share
2 answers

I think the question can be posed as follows:

  • save to a folder in a web application or close it and have metadata stored in the database
  • capture saved images from database through WCF

The second approach is likely to be rather slow. Having captured the information on the service, convert it, use httphandler with the correct mime type to output the binary stream to the browser ...

Most architectures are cut in the middle: save images at the level of the user interface or inside it, as well as metadata about them stored in the database. Getting this information is basically just a bunch of strings that are so easily retrievable.

Update for new question:

winforms-/ , - . :

  • WCF . , , .
  • - (asmx WCF ), winforms.
  • winforms , web ui, . , , .

, . , ui , winforms ? , ASP.NET , winforms .

+1

, .

, , , - , - -.

, -, , , , , FileWatcher. -, .

, , - , :

  • , .
  • , . .
+1

Source: https://habr.com/ru/post/1757105/


All Articles