Hi,
I've used upload controller; it places uploaded files in tomcat temp directory and obviously After tomcat shut down, temp directory would be cleaned. How can I change upload directory to another local directory or ftp address? Thanks, NAfise |
Administrator
|
Nafise,
The idea is that temporary files are removed when the session for the user that uploaded the file expires. It is assumed that your application will copy those files to a more permanent directory or save them in a database, for instance when the user "saves" the form. If you don't, even if the files were not deleted, you would be left with a number of "random" temporary files in a directory that are not tied to any specific user. Alex |
thank you Alex, I'm going to save uploaded image files as base64Binary.
|
Now, I'm using the eXist database to store uploaded images as base64Binary. It seems to work properly.
However, I don't know how to present the uploaded images. At the time of using temporary directories I had written below line in my xhtml to show the image: <xforms:output ref="logo" mediatype="image/*" /> (the logo contained the address of temporary file) and it was ok . now, using base64Binary type, the above output is not working and All I can see is an empty border. then, how could I display an image which has been stored as a base64Binary? Thank you, Nafise
|
Administrator
|
On Jan 18, 2008 10:01 AM, Nafise <[hidden email]> wrote:
> Now, I'm using the eXist database to store uploaded images as base64Binary. > It seems to work properly. Great. > However, I don't know how to present the uploaded images. At the time of > using temporary directories I had written below line in my xhtml to show the > image: > > <xforms:output ref="logo" mediatype="image/*" /> (the logo contained the > address of temporary file) > > and it was ok . > > now, using base64Binary type, the above output is not working and All I can > see is an empty border. "logo" contains some base64, right? Then you will need to serialize it to a temporary file (you can use for this the new improvements to the file serializer; see: http://www.nabble.com/New-feature%3A-Support-for-temporary-files-in-File-serializer-to14768186.html) when you load the XML from eXist. Then you're in the same case as you were before. But note that the URL to the temporary file may work locally, but won't work if someone is accessing your server remotely. In that case you will need to change that with a URL that points back to your server and serves that temporary file. Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
Alex,
Thenk you very much for the explanation. Actually, I switched to save base64Binary in order not to encounter to the temporary files problem, but it seems that it just makes things more complicated. I've reviewed almost all messeges about upload in forum, but still can't figure out what's the practical solution. Briefly, I want to make a form in which each user could upload various files such as image and doc; considering below issues: = the files should be representable on page = they should be downloadable = they have to be permanent I think it's a very common problem and even worths adding an extra sample in orbeon examples ;) Has anybody had a similar problem? any practical experience? so please SOS. Thanks in advance. NAfise
|
Administrator
|
Nafise,
On Jan 20, 2008 4:53 AM, Nafise <[hidden email]> wrote: > I've reviewed all messeges about upload in forum, but still can't figure out > what's the practical solution. The best I can offer is the scheme I wrote about in my previous message in this thread. In the future, you could conceive that the <xforms:output> could do all of this for you. I.e. generating an ID for a given base64 encode image, including in the page a URL that points to a service passing that ID, providing the service that serves the image based on the ID and corresponding base64 image. We don't see a pressing need on our side for this feature, so this will come if someone implements it and contributes the code or if some one sponsors this work. Alex -- Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws |
In reply to this post by Nafise
I have the same problem!!!
Did you solve it?
|
Free forum by Nabble | Edit this page |