开发者

BlazeDS/ FLEX - Upload an Image and Display

开发者 https://www.devze.com 2023-02-28 07:20 出处:网络
I\'m working on a FLEX which enables the user navigate through a list of images at the server (BalzeDS tomcat 4.0.0.14931). The images stored under the \"WebContent/Images\", and the already available

I'm working on a FLEX which enables the user navigate through a list of images at the server (BalzeDS tomcat 4.0.0.14931). The images stored under the "WebContent/Images", and the already available/ saved images are displayed as desire开发者_如何学God.

From this app user would be able to select a file from their local directory and upload it. I have done the necessary coding related with uploading the image and it successfully creates a copy at the desired folder at the server. Once the image file is uploaded I'm trying to display the it at the FLEX end, but the image is not displayed. When check at the target folder at the server end, the file has been created successfully.

In order to make the uploaded image visible, the BlazeDS Tomcat server has to be restarted. Since this is not desired way to go ahead, I am seeking some help from you experts out there to resolved this.

I tried searching the net get this issue sorted out, but unable to come cross any solution. An identical issue was posted on another forum (Tomcat restart problem), that also still not resolved.

I this is best approach to achieve this JAVA/ BlazeDS/ TomCat/ FLEX environment or is there a better alternative. The other alternative I could achieve this is through persisting the file into the database as byte[], but I did not want accomplish in that manner since size of the database tend to shoot up.

I would really appreciate if you could help me out on this.

Thanks in advance.


If you have to restart Tomcat, that means you are storing user data in your web-apps directory. You should not be storing any user data in the webapps folder. These are considered "system files" and should not be publicly editable under any circumstance.

Store any user data in a publicly accessible folder with the correct permissions and serve them over HTTP (you should be able to view it in a web browser).

0

精彩评论

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