开发者

Retrieving uploaded files from server hard disk

开发者 https://www.devze.com 2023-02-25 05:05 出处:网络
(I am using netbeans 6.8,running a Java Web Application,Glassfish server) Assume i am storing the uploaded files in C:\\temp folder...

(I am using netbeans 6.8, running a Java Web Application, Glassfish server)

Assume i am storing the uploaded files in C:\temp folder...

and my Netbeans project path is C:\NetBean开发者_StackOverflow中文版s\WebApplication3...

Is there any way i can stream or make the files in C:\temp folder available for download.....

(without storing it in a database)


I think it's not possible to store the file in C:\ drive since it will violate the security feature of java, hence you to save the file in a temporary folder.

Then you can use properties file or use servletContext.getRealPath() to access the file.

0

精彩评论

暂无评论...
验证码 换一张
取 消