How can I upload a file (xml specifically) onto the database server on a certain location specified by an Oracle directory? It seems that fileUpload stores the file in a clob in some table, isn't it? Do I have to save it, then, from the table into my destination directory? What's the best way to have my file in that directory knowing that this is a file uploaded by the user at runtime. Afterwards, a series of processing steps are executed depending on the content. |
Hi Cezar, You don't have to save the uploaded CLOB in any database table, it's possible to retrieve the uploaded file and create a file onto the database server on the fly. You can retrieve the uploaded file as a BLOB using the The procedure below retrieves the uploaded file from a fileUpload component named "mainPanel.fileUpload" and creates a file onto the database server using a database directory named "DBDIR":
You may use the following panel XML to experiment the procedure above:
Hope this helps, It appears that something goes wrong. I am uploading various files. For example, one is called test1.xml (4.5k) and the other is called text2.xml (180k). First one is uploaded into my destination database server directory, but the latter triggers an error. In formspider I get a popup saying "Cannot find Application 'myApp'". I tried to catch the error putting api_application.showpopupmessage(sqlcode || sqlerrm); in the exception block, but no luck. No popup is beeing shown. Any hints please? Thanks
(01 Feb '13, 13:41)
cezarp
|