Managing user files JEE?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
4 views
What is the industry practice of managing user-uploaded files in a web application written in Java technology stack?


Made in PHP, for example to throw user files "under the feet", in the application subdirectories.

At the same time, architecture JEE preclude such practices (focusing on the further growth of volumes of stored, etc.).


But I did not understand what is being promoted instead? How to save and get a profile pic not coming up with your bike?
by | 4 views

4 Answers

0 like 0 dislike
save and store the image on disk, not in the database, otherwise you will lose on returns. And give using either default servlet, which is specifically for serving static and made (stamped with the correct headers, etc.), and even better using a proxy http server (apache, ngnix, lighthttpd).
\r
Ie save to the folder where you can configure the URLs of form wasserwacht
by
0 like 0 dislike
If you intend to access rights — then definitely store in the database.
by
0 like 0 dislike
I think the files should be stored on the file system, not in the database. In the database need to store the path to the files, and then figure out, depending on the access rights to give the path to the file or not. Although if the mate label, and it is possible in the database. It is clear that the choice of the solution depends on the volume of data you are going to save.
by
0 like 0 dislike
Well, if you have many files, then fold them into a special services type aws.amazon.com/s3/ or GAE (there is another API for manipulating images)
by

Related questions

0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
3 answers
110,608 questions
257,186 answers
0 comments
28,072 users