File upload to sftp server using apex

We have an SFTP server on Linux and we want to provide users with web-based interface (Oracle APEX has been chosen for that purpose) so they can upload their flat files to our sftp server via secure transmission. is it possible to implement on APEX? What might be possible solution? or any workarouds?
Thanks in advance.

Hello Kevin,
>
if I got it right, in such a case files have to be stored in database directory, as far as I know APEX only allows to store files in database tables. is there any way to put files to a directory without storing them in tables? For instance, I want files to be placed in some oracle directory when users choose files with FILE BROWSE item and then submit the page.
>
Yes APEX stores files to tables, but there is a way to store them to OS directory.
I don't know much about the plugin SaveToDisk:
http://apex-plugin.com/oracle-apex-plugins/process-type-plugin/savetodisk_167.html
but i have tried a blog solution by Håvard Kristiansen and it works fine:
http://monkeyonoracle.blogspot.in/2009/10/storing-images-outside-oracle-xe-with.html
He has given this solution to store images outside Oracle XE i.e. to a server directory.
I had done this way:
1) User uploads a file through file browse.
2) The file is stored to APEX_APPLICATION_FILES or WWV_FLOW_FILES.
3) The file is written to the OS directory using the write_to_file procedure mentioned in the blog.
Hope it helps!
Regards,
Kiran

Similar Messages

  • Cant do a file get from external server using file sender adapter with ftp

    Hi all,
    Up until now our company has only used the file sender adapter with ftp protocol to get a file from our XI server for processing and input the file into an integration process
    I have a requirement to do an ftp file get from an external server
    From our XI development server I can ftp directly to the external server and view the required directory using the command window via a DOS prompt (FTP open ...).  So all firewall issues and communications are fine
    Unfortunately I cannot currently pull files from the external server using the XI file adapter with ftp protocol from the XI development server AWB017
    FTP Connection Parameters: External server name using port 21, Data Connection is Passive, No security, I supply a userid and password
    Processing Parameters: Processing Mode is Archive (I tried test but this did not work either)
    No messages appear in the RWB
    Is there something else that I need to set up in order for the external ftp get to work via the XI file adapter?
    Regards,
    Mike

    Thanks for your responses.
    I have found the error messages in the File Adapter Monitor
    Scenario 1
    When I prefix the source directory with a forward slash, eg <b>/Folder/Subfolder</b> the error message is as follows
    <b>EST: Error: Error connecting to ftp server 'ip address': FTPEx: /Folder/Subfolder: The system cannot find the path specified</b>
    Scenario 2
    When I DO NOT prefix the source directory with a forward slash, eg <b>Folder/Subfolder</b> a different error message is returned
    <b>Error: Retrieving file 'FILENAME.XML' failed unexpectedly: FTPEx: Folder/Subfolder: The system cannot find the path specified</b>
    At least in this scenario the adapter has been able to identify the file on the external FTP site but cannot retrieve it
    Questions
    I thought that the backslash prefix for the source directory was mandatory but I am receiving an error in each scenario
    I receive the same error message whether the Processing Mode is 'Archive' or 'Test'
    The logs on the external ftp server seem to indicate that I am simply connecting, sending username and password then quiting straight away. I am not issuing any commands that they can see
    I thought that being a Sender adapter it would inherently execute a Pull or Get command
    To recap, from our XI development server I can ftp directly to the external server and view the required directory using the command window via a DOS prompt (FTP open ...). So all firewall issues, communications, userid and password are fine
    Has anyone experienced these issues?
    Please advise on next course of action?
    Regards,
    Mike

  • Problem Connecting to SFTP server using the SFTP Transport in OSB 11gr1

    Hi,
    I have a proxy service that polls for files from an SFTP server. But there seems to be some problem with the handshake between the both.
    Below is the error that is logged:
    <Error> <WliSbTransports> <tshvm03x> <OSB_AdminServer1a> <pool-14-thread-1> <weblogic> <> <11d1def534ea1be0:-2e6486ae:130dafcd1ef:-8000-0000000000615cf8> <1309358912109> <BEA-381602> <Error encountered while polling the resource for the service endpoint ProxyService$XXWMMPROJECTS$DF155_INBOUND_ASN$Proxy_Services$PS_PO_DF002_SFTP_01: com.bea.wli.sb.transports.TransportException
    com.bea.wli.sb.transports.TransportException
    at com.bea.wli.sb.transports.sftp.connector.SFTPWorkPartitioningAgent.execute(SFTPWorkPartitioningAgent.java:125)
    at com.bea.wli.sb.transports.poller.TransportTimerListener.run(TransportTimerListener.java:74)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
    Caused By: java.util.NoSuchElementException
    at java.util.StringTokenizer.nextToken(StringTokenizer.java:332)
    at java.util.StringTokenizer.nextElement(StringTokenizer.java:390)
    at com.bea.wli.sb.transports.sftp.client.KnownHostVerifier.validateKnownHosts(KnownHostVerifier.java:65)
    at com.bea.wli.sb.transports.sftp.client.SFTPClient.authenticate(SFTPClient.java:104)
    at com.bea.wli.sb.transports.sftp.connector.SFTPResource.<init>(SFTPResource.java:77)
    at com.bea.wli.sb.transports.sftp.resource.SFTPUtils.createSFTPResource(SFTPUtils.java:170)
    at com.bea.wli.sb.transports.sftp.connector.SFTPWorkPartitioningAgent.getSftpResource(SFTPWorkPartitioningAgent.java:148)
    at com.bea.wli.sb.transports.sftp.connector.SFTPWorkPartitioningAgent.execute(SFTPWorkPartitioningAgent.java:58)
    at com.bea.wli.sb.transports.poller.TransportTimerListener.run(TransportTimerListener.java:74)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:662)
    >
    I could see the same error mentioned in a couple of posts; but couldn't find any resolution to it. Any Pointers on this would really help.
    Settings Done:
    I have configured a service key provider.
    Placed the Known_hosts file at Domain_Home/config/osb/transports/sftp with all the necessary details.
    Thanks,
    Manoj

    Hi Manoj,
    It may be an issue with Known_hosts file. Make sure that it is properly formed and it has no space/newline character at the starting of the file.
    Regards,
    Anuj

  • How do I copy a file to a remote server using runtime exec - plz Help!

    Hi,
    I am trying to copy a file to a remote server using a runtime exec command as follows:
    Runtime.getRuntime().exec("scp "+getProperty(ListNewHandsetDetailsConstant.PROP_OUTPUT_PATH_JAR)+getProperty(ListNewHandsetDetailsConstant.PROP_OUTPUT_JAR_NAME)+".jar "+" "+getProperty(ListNewHandsetDetailsConstant.PROP_OUTPUT_PATH_TWO_USERNAME)+"@"+getProperty(ListNewHandsetDetailsConstant.PROP_OUTPUT_PATH_TWO_URL)+":"+getProperty(ListNewHandsetDetailsConstant.PROP_OUTPUT_PATH_TWO_JAR));
    Problem is this statement does not execute, as when I try it directly on command line, it requests for a password. Any suggestions on how I can get rid of that? I think I might have to configure my ssh_config file, but when I did some "Googling", I found the configuration settings of a ssh2_config file. I tried those (changing it to Host-based Authentication), but it didn't recognise them. Please help, this is so urgent!
    Regards,
    Simz

    Don't use Runtime.exec (or ProcessBuilder) for this. Check out JSch at JCraft (or some other Java SSH API.

  • Upload a jar file in remote Weblogic server using wlst

    Is there a way to upload a jar file to a specific location on remote weblogic server using wlst? This is my scenario - I need to upload aspectjweaver.jar to the remote server. This needs to be done before weblogic startup, as weaving takes place during startup . FTP is not an option because those ports are blocked

    Hi,
    You don't have such option through upload files as what FTP do but you can deploy the application through wlst.
    eg:
    deploy('Web14','C:/TEMP/Web14.war',targets='Cluster1',stageMode='stage',upload='true',remote='true')
    Or you can use Deploy option to deploy app directly.
    eg:
    java weblogic.Deployer -adminurl http://localhost:7001
    -username weblogic -password weblogic
    -deploy ./myapp.ear -id myDeployment
    This will upload file and place the file there from there you can manipulate the file.
    Hope this will work for you.
    Regards,
    Kal

  • Need Help to locate a file on a FTP server using MediaLocator class

    Hi Friends,
    This is Venkat. Iam currently working on a Multimedia J2EE web project. Iam working on a requirement to
    show Thumbnail view for uploaded media. For this i have downloaded a standalone code from the following site.
    http://www.exactfutures.com/index02.htm.
    This code converts frames of a media files to jpg images which i can use them to show as Thumbnails.
    The code takes file name which is present in project folder as parameter. But in my web project iam using a FTP server to store my media files.
    The above code uses Java Media Framework along with another API Fobs4JMF. The media file name is passed to MediaLocator class constructor which is located in the project folder. Iam talking about a standalone application here.
    But my project is a J2EE web application.
    Now my problem is that, how can i refer a file which is located on a external FTP server and pass it to MediaLocator or some other class.
    Say the ftp file URL is mms://wm.testuser.net/12365741/testvideo.wmv
    Guys hope you are clear abt my problem. Please help me ASAP.
    Below is the part of code
         * Constructor
         public vid2jpg(String path) {
              MediaLocator ml;
              String args = path;
              if ((ml = new MediaLocator(args)) == null) {
                   System.out.println("Cannot build media locator from: " + args);
              if (!open(ml)) {
                   System.out.println("Failed to open media source");
         * Given a MediaLocator, create a processor and start
         private boolean open(MediaLocator ml) {
              System.out.println("Create processor for: " + ml);
              try {
                   p = Manager.createProcessor(ml);
              } catch (Exception e) {
                   System.out.println("Failed to create a processor from the given media source: " + e);
                   return false;
              p.addControllerListener(this);
              // Put the Processor into configured state.
              p.configure();
              if (!waitForState(p.Configured)) {
                   System.out.println("Failed to configure the processor.");
                   return false;
              // Get the raw output from the Processor.
              p.setContentDescriptor(new ContentDescriptor(ContentDescriptor.RAW));
    Thanks in Advance for your time.
    Venkat
    Edited by: VenkataGuru on Jul 23, 2008 5:30 PM

    Hi Mani,
    Below is code that ran successfully on a cRIO-9002.  It looks much the same as yours, please double-check the formatting of your string controls.  If things still do not work, let's look at the cRIO more closely.
    Message Edited by Pie56694 on 06-30-2008 09:45 AM
    Attachments:
    FTPDELE3.jpg ‏28 KB
    FTPDELE.jpg ‏24 KB
    FTPDELE2.jpg ‏18 KB

  • LSMW file upload from presentation server

    Hi,
    We are using LSMW to create new Document info records and will need to upload/ attach multiple files to the DIR.
    everything is working except in the IDOC processing stage, it errors out -
    "Error while checking in and storing:
    otlta134a\pcm\test1.txt"
    Its is unable to upload file from network drive, it works successfully when the same file is uploaded from application server.
    I have worked in other LSMW projects and have successfully loaded files from network drive.
    Please let me know what configuration setup is required, is it the content server or the gateway server?
    Thanks for all your help.

    Sheetal,
    I think this is the problem due to the authorization....
    try to open the file from AL11........... if u r still getting the problem better to contact the basis guys...
    If it is the problem with the authorization... once u get this error open another session with SU53 tcode.. take the authorization object and give it to basis guys to allow the permissions to u...

  • File upload on different server. URGENT need help.

    hi,
    I am using struts common file upload to upload file from client. My problem is my application is running on server A but i want to store uploaded stream on server B without storing it on server A(i,e. without using FTP or rsync from server A to server B). Please help how can i achieve this task.
    Anuj

    Write and run a standalone application on "Server A" to accept a socket connection from "Server B" then feed the inputStream that "Server B" uses to upload the file, to the socketOutputStream that it has opened with "Server A" and have Server A save that file.

  • File upload to application server

    hi,
        i wanna upload a CSD file into the application server is there any FM to do these.
       while the program is executed i wanna check whether it is being executed in the foreground or background,if the report is executed is executed in the background a CSD file has to be generated.
    its urgent and surely pionts are granted.

    1) if it is one time only then u can make use of transaction CG3Y and CG3Z to download/upload fiel frm or to application server.
    0r
    2) refer this code to donwload/upload file on Aserver
    REPORT  ZGILL_AS    message-id rp                            .
    tables: pa0001,pa0002.
    select-options s_pernr for pa0001-pernr no intervals MODIF ID XYZ.
    parameters: p_dwnld AS CHECKBOX ,
                p_upld AS CHECKBOX  DEFAULT 'X'.
    parameters: P_DSNI(75)                   TYPE C MODIF ID ABG DEFAULT
              '/usr/local/sapdata/amit.dat' LOWER CASE.
    data: begin of itab occurs 0,
          pernr(8),
          sp1(1) value ',',
          werks(4),
          sp2(1) value ',',
          persg(1),
          sp3(1) value ',',
          persk(2),
          end of itab.
    data: s_eof(3).
    start-of-selection.
    if p_upld = 'X'.
    OPEN DATASET P_DSNI FOR OUTPUT IN LEGACY TEXT MODE.
    PERFORM FETCH_DATA.
    STOP.
    elseif p_dwnld = 'X'.
    OPEN DATASET P_DSNI FOR INPUT IN LEGACY TEXT MODE.
    IF  SY-SUBRC               NE        0.
        MESSAGE E016 WITH
          'Error opening seq. file, RC:' SY-SUBRC.
        EXIT.
      ENDIF.
    CLEAR S_EOF.
    DO.
        PERFORM FETCH_file.
        IF  S_EOF EQ 'YES'. stop. ENDIF.
    ENDDO.
    endif.
    END-OF-SELECTION.
      if itab[] is not initial.
         perform  print_file1 tables itab.
       else.
       write:/ 'No records exists'.
       endif.
    *&      Form  FETCH_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM FETCH_DATA .
    SELECT * FROM PA0001 WHERE PERNR IN S_PERNR.
    MOVE-CORRESPONDING PA0001 TO ITAB.
    TRANSFER ITAB TO P_DSNI.
    APPEND ITAB.
    ENDSELECT.
    CLOSE DATASET P_DSNI.
    ENDFORM.                    " FETCH_DATA
    *&      Form  FETCH_file
          text
    -->  p1        text
    <--  p2        text
    FORM FETCH_file .
    READ DATASET P_DSNI INTO itab.
    append itab.
    clear itab.
    IF  SY-SUBRC               NE        0.
        S_EOF = 'YES'. EXIT.
    ENDIF.
    ENDFORM.                    " FETCH_file
    *&      Form  print_file1
          text
         -->P_ITAB  text
    FORM print_file1  tables P_ITAB structure itab .
    write:/2 'EmpNo',
           14 'Personnel Area',
           34 'Emp Group',
           47 'Emp SubGroup'.
    skip 1.
    loop at p_itab.
    write:2  p_itab-pernr,
          14 p_itab-werks,
          34 p_itab-persg,
          47 p_itab-persk.
    skip 1.
    endloop.
    ENDFORM.                    " print_file1
    3) for ur third requirement make use of sy-batch field.

  • Loading flat files located on a server using the Control Center piece ofOWB

    Loading flat files from a server with OWB
    I am successful loading files with OWB, as long as they resided on my workstation in the C:\ drive. I copied the files to a Linux server into directories owned by Oracle/oinstall, permissions on the directories containing the files are 777. I ran the OWB client from the server with the following results:
    Error
    RPE-01013: SQL Loader reported error condition, number 1.
    SQL*Loader: Release 10.2.0.1.0 - Production on Fri Mar 9 11:15:58 2007
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    SQL*Loader-500: Unable to open file (/u00/data/owb_repos1/state_codes.csv)
    SQL*Loader-553: file not found
    SQL*Loader-509: System error: The system cannot find the file specified.
    SQL*Loader: Release 10.2.0.1.0 - Production on Fri Mar 9 11:15:58 2007
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    SQL*Loader-500: Unable to open file (/u00/data/owb_repos1/state_codes.csv)
    SQL*Loader-553: file not found
    SQL*Loader-509: System error: The system cannot find the file specified.
    I tried to load the file using the control center from both the windows client and the server client. Can I do this from either one?
    I can't import the file in the Design Center from the /u00/data/owb_repos1 directory, it does not show up.
    If anyone has received similiar errors from OWB, please tell me how I can fix this. THANKS!!!
    [d97886@owbtest owb_repos1]$ pwd
    /u00/data/owb_repos1
    [d97886@owbtest owb_repos1]$ ls -la
    total 24
    drwxrwxrwx 2 oracle oinstall 4096 Mar 19 12:14 .
    drwxrwxrwx 18 oracle oinstall 4096 Mar 6 16:41 ..
    -rwxrwxrwx 1 oracle garrett 1481 Mar 8 07:32 state_codes.csv
    [d97886@owbtest owb_repos1]$

    Hi
    This is what i do for my flat files (i am loading my tables from the flat files):
    1) Create location for the files in OWB and it should look something like \\path_to_where_the_files_are. Here you should be able to browse to your Linux box and select the location of the files.
    2) Then check whatever you use (i use TOAD) and you should see in owb schema a directory created there which points to the location of the flat file.
    3) then just follow the guide to sample the files etc and you are good to go.
    Basically OWB has to be able to see the files that are on Linux machine.
    Alternatively you can map your Linux share to your windows box (use samba or something) and use it that way.
    Sorry if it is stating the obvious.
    Hope this helps
    Kind Regards
    Vix

  • File uploading to Application server

    Hi all-
    I have a requirement to upload the FTP server file to Application server in Ascii mode. Can anyone send me the code? or atleast tell me the procedure of doing this? pls send any code or info to [email protected]
    Thanks
    m a

    Hi
    See the demo programs RSFTP00*
    Max

  • Post a File to a web server using HTTP_POST

    Hello,
    I have to generate a program to post a file ".TXT" to a web server using a HTTP POST with multipart form and a couple of variables (user, password).
    I was investigating and I found that I can do it using SAPHTTP but I dont know how to work with the FM HTTP_POST.
    Does anyone have a sample code?
    Thanks
    Ariel

    sample usage:
      CALL FUNCTION 'HTTP_POST'
        EXPORTING
          ABSOLUTE_URI                = IM_OFX_CONTROL_DATA-ADDRESS
          REQUEST_ENTITY_BODY_LENGTH  = RESPONSE_ENTITY_BODY_LENGTH
          RFC_DESTINATION             = IM_OFX_CONTROL_DATA-HTTP_RFCDEST
          USER                        = IM_OFX_CONTROL_DATA-HTTP_USER
          PASSWORD                    = IM_OFX_CONTROL_DATA-HTTP_PASSWORD
          BLANKSTOCRLF                = 'X'
        IMPORTING
          STATUS_CODE                 = STATUS
          STATUS_TEXT                 = STATUS_TEXT
          RESPONSE_ENTITY_BODY_LENGTH = RLENGTH
        TABLES
          REQUEST_ENTITY_BODY         = LT_REQUEST
          RESPONSE_ENTITY_BODY        = RESPONSE
          RESPONSE_HEADERS            = LT_RESPONSE_HEADERS
          REQUEST_HEADERS             = LT_HTTP_HEADERS
       EXCEPTIONS
            OTHERS                      = 1.
    Refer the programs:
    LFPIFF02            
    LOFXALSU04          
    LPRGN_URL_RESPONSEU01
    LSBCCU01            
    LSFTPU09            
    for some idea.
    regards,
    ravi

  • Transfer file from client to server using http

    HI friends,
    I want to transfer files from client to server...I tried that with the help of socket and rmi..........
    But Http is only the best mechanism for my application..........
    Without using servlets, how to transfer files with the help of http.....
    Any help would be appreciated.......

    Google is your friend, and appearently www.jguru.com also:
    http://www.jguru.com/faq/view.jsp?EID=160

  • Multiple file upload in SharePoint 2013 using AjaxFileUpload

    Hi all,
    I want to add multiple files using file upload control in our visual web part SharePoint 2013. I tried to use AjaxFileUpload (from Ajaxcontrol toolkit) in my visual web part and also added the handler in web.config as described in article (http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/ajaxFileUpload/ajaxFileUpload.aspx).
    But, it’s not even opening the browse dialog box.
    I also tried to see if any third party control is available to achieve multiple file upload in SharePoint 2013 Visual web part, but without any success.
    Please help.
    Regards,
    Monica

    Hi
    Try to add the dll files of Ajax Control Toolkit in the
    Bin folder of your SharePoint Web Application (IIS Site)
    Hope that help
    Ahmed Naji SharePoint Geek
    MCP|MCTS|MCPD
    My English SharePoint Blog | DotnetFinder My Arabic SharePoint Blog|
    CodeReloaded
    My Gallery Contributions
    SharePoint 2010 Twitter Web Part
    SharePoint 2010 Custom Timer Job

  • Regarding file uploading to application server

    hi ,
    i am facing a problem while uploading a .csv file to the application server.
    it is going to dump.
    error is ,
    the capacity limit has been reached
    pls urgent .
    points are assured.

    try these link, if still there is problem, write the error analysis from st22
    http://www.sap-img.com/ab004.htm
    http://sap.ittoolbox.com/topics/t.asp?t=303&p=448&h2=322&h1=303&h3=448
    http://www.sapdevelopment.co.uk/file/file_uploadsap.htm
    ajay

Maybe you are looking for

  • Exception thrown while deleting (uninstalling) application in Weblogic 10.3

    Hello, I get following Exception the webpage when I uninstall application from Weblogic 10.3. I installed it as part of middleware 11.1.1.0.2 Unexpected Exception An unexpected exception has occurred processing your request Message: Stack Trace: webl

  • Creating TOC in CP4 with Arabic language contents

    Hello all, i'm preparing my captivate project4 using Arabic language. The TOC entries with Arabic words are switched left to right instead of right to left during project preview. what to do? your help please

  • Project WBS element cost allocation

    Dear All, In a project we have created 10 WBS elements out of which one is used for common expenses and rest other or individual works carried out in the project. Now i want to allocate the Common cost of one WBS element to other nine WBS elements. C

  • My macpro cant find installation information on this machine. help

    i am trying to reinstall the Lion but i constantly receivin this "Cant Find installation information on this machine" i need help here.

  • View files by default on startup

    Is there a way to get rid of the prompt for each file when Dreamweaver 8 starts up, which asks you what you want to do for files that are not checked out (read only)? If the file is read only, then I want to view it by default. If it is checked out..