Upload file from AS to DB
rammingNov 20 2008 — edited Jan 7 2009Hello,
I want to transfer a file from the application server into the database. In WebUtil there are functions to transfer files from the DB to client, transfer files from client to the DB, from client to the application server, and from application server to client. But I am missing a function to transfer files from application server to DB.
Background for this requirement : With my application users can download/edit/upload files to the database. These files can be printed embedded in reports. As Web-Reports can only embed images, these documents have to be converted to an image format, which is stored in the database, too, and then retrieved by the reports. This conversion happens due to licensing costs on the application server by using Oracle Inside Out Technology, which is working fantastically. This is really a brilliant piece of software which can convert nearly any document format to an image format in good quality and very short time.
So, due to the above mentioned missing function, this is what happens now : User downloads a document from DB, edits on the client, and clicks "Save"-button. Now the document is uploaded to DB, uploaded to AS, converted to image file, document deleted (it's already in the DB). Image file gets downloaded to client, then uploaded to DB.
This takes a very long time, in which the user is waiting for the application to continue.
Two notes :
I know I can transfer the files with WebUtil asynchronously, but this is not recommendable, because right after saving the file the user wants to print it in a report (to check the result of his work). So the image file has to be present in the DB.
The conversion of the document to an image file via Oracle Inside Out only takes seconds. So this is not prolonging the whole of it significantly.
I believe I can shorten this workflow, if I would be able to upload the image file directly from the application server to the DB. Maybe there's a chance using PL/SQL code in the database to store this image file. But how can the DB access the application server?
Maybe there are other possibilities to achive this requirement. Any ideas are welcome!
Regards
Kai Ramming