What's the best way to store uploaded files in web java application? I'm currently storing all uploaded files inside project folder. Unfortunately deploying new version of application is a pain in the arse. Do you have any good practice of storing uploaded files?
You can upload into Database with Blob Type or your can save the file upload into file system but a external folder example c:/Users/youruser/documents/resources to redeploy do not replace.
FileOutputStream fos = new FileOutputStream(System.getProperty("home.dir")+"/resources/file.jpg"); //to save into my documents folder
with jackrabbit(JCR) the sintaxis is similar to
Node.setProperty(java.lang.String name,Binary value)
to store content, i think that the JCR is the best Way
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.