This content has been marked as final. Show 6 replies
No ideas? Nobody?
I think that there must be solution how to get binary data from POST method and store it to some table with BLOB column. Standard APEX browse item do it some way, but I woul like to transform, resize image on client side before uploading to server.
here are my two cents ...
this will be a bit difficult. When you use the standard APEX File upload it is not PL/SQL handling the POST request. The request is handled by the webserver - depending on the variant you are using it is either mod_plsql, the C code of the Embedded Gateway or the APEX Listener. The webserver is also doint the insert into APEX' file repository. So I see two options:
It might be possible to configure your plugin (don't know about it) the behave the same as a standard browser upload. Then for APEX there would be no difference - mod_plsql should handle the files accordingly.
If you want to handle the POST request yourself, as said, you can't do this in PL/SQL. It would be possible to write a Java servlet doing this and deploy that servlet on the same container as the APEX Listener (when using Apache with mod_plsql you would need an additional Java server for that) ....
Hope this helps ...
I am using embeded PL/SQL gateway.
I have read something about DAD (Database Access Descriptors)
It seems that APEX is using it internally for "browse file component" because recomended table structure for that component is same as described in this documentation.
This way I should be able create my own procedure that will be mapped as HTTP servlet and can automatically save POSTed data to database table.
But this is only my idea, I have no experiences with DADs.
Did you ever get this to work? I'm looking at creating a plugin.
whatever web listener use are using (J2EE Listener, Apache w mod_plsql or Embedded Gateway). In neither of these you will have direct access to the HTTP post request.
The DAD definition contains a "document tablename" ....
The webserver directly performs the SQL insert operation into that table and you can retrieve the file using SQL afterwards. But you cannot jump into that process before the webserver has inserted the file into the table. When your PL/SQL logic starts (your PL/SQL procedure, APEX or a plugin), the file has already been inserted into that table.
Does that help ...?
Deutschsprachige APEX-Community: Tipps, Tricks, Best Practice
SQL und PL/SQL: Tipps, Tricks & Best Practice
Twitter: @cczarski @oraclebudb
I'm trying to implement this but I'm getting wwv_flow.show - 404 File not found.