Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

direct file upload from end user's machine to sftp server

963119Sep 19 2012 — edited Sep 20 2012
Hello there!
I want my application to provide an end-user with ability to upload the files from their machine to SFTP server directly. So far, I have managed to write the function which uses java source and allows to upload files from the database. It works just fine.

The function looks as follows:

FUNCTION SFTP_CMD (
V_USER IN VARCHAR2,
V_PASS IN VARCHAR2,
V_HOST IN VARCHAR2,
V_FILE_SRC IN VARCHAR2,
V_FILE_TRG IN VARCHAR2,
V_CMD IN VARCHAR2
)
RETURN VARCHAR2
IS
LANGUAGE JAVA NAME 'Sftp. sftpcmd( java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String ) return java.lang.String';

where V_FILE_SRC represents location of the file to be uploaded. The thing is that the FILE BROWSE apex item does not allow to specify the file location, it identifies it somehow automatically, when you press the button 'Choose file'. The question is how can I catch file's path, so that I can pass it to V_FILE_SRC parameter in my function? Should I write my own plugin? or hack FILE BROWSE item? =)
This post has been answered by fac586 on Sep 19 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 18 2012
Added on Sep 19 2012
2 comments
674 views