Upload / Save file via FileUpload UI Element under predefined path

Hi,
I am pretty new to this topic and need some help.
I need a Web Dynpro App where I can select a file via FileUpload UI Element and save this file to a predefined path e.g. to a server. I already found [this help|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00062266-3aa9-2910-d485-f1088c3a4d71?quicklink=index&overridelayout=true] but in this example the file is stored at the SAP Server!
How can I achieve this? May you give me a sample code?
I appreciate your help.
Regards

Hi Martni, Above answer was incomplete
try{                         
     File fp = new File(relativePath+ fileName);
     fp.createNewFile();
     FileOutputStream fos = new FileOutputStream(fp);
     BufferedOutputStream bos = new BufferedOutputStream(fos);
     InputStream l_is_FileStream = elAttachmentsElement.getVa_Resource().read(false);
     int l_int_NoOfBytes = l_is_FileStream.available();
     byte[] byteArray = new byte[l_int_NoOfBytes];
     l_is_FileStream.read(byteArray, 0, l_int_NoOfBytes);
     bos.write(byteArray);
     bos.flush();
catch (Exception e) {
     wdComponentAPI.getMessageManager().reportException("Cannot save the file: "+fileName);
In the above snippet "relativePath" is the path to the folder in WAS and  "filename" is the name of the file along with its extn Ex. test.doc, or image.jpg
InputStream l_is_FileStream = elAttachmentsElement.getVa_Resource().read(false)
The above line of code is the sixth line in the snippet and here "elAttachmentsElement" is the element of the node having "Va_Resource" context attribute, which is bound to FileUpload UI element.
Regards,
Vishweshwara P.K.M
Edited by: Vishweshwara P.K.M on Jun 28, 2010 1:31 PM

Similar Messages

  • Unable to upload video files via iframe in safari version 3.0

    I m not able 2 upload video files via iframe in safari 3.0.
    i m facing this issue when i try 2 upload a video file via an iframe.
    file gets uploaded properly if i m not using iframe to upload the same.
    this issue is seen only in safari version 3.0 and not in the newer version i.e (3.2.1)
    do anyone has the asnwer for this problem.....???
    would be thankful to him/her...

    Are you using a BT Home Hub with the IP Phone attached. This holds onto the SIP port that iChat uses. There is no way to get the router to release this port.
    I had to return it all to BT as unfit for purpose and switched to Eclipse!

  • Error while uploading a file via GS_CM

    Dear experts,
    When we try to upload some files to CRM incident via GS_CM we gen a following error: "operation is not allowed (crm_p_ord)"
    We noticed that the error usually arrears when we upload files with long file names ( 30> chars)
    It's important to say that we can add files having a shorter file name( up to ~30 chars).
    Does anyone know the limitations about the file name (length, special characters, etc.) ?
    We are using CRM7 (ICM).
    Thank you

    Hi,
        Covert quantity to char and upload the data.
    Regards
    Amole

  • Programmatically bulk upload of files via restful API

    Hi,
    If I am building a custom client application and need to bulk upload say 10 files.. what restful API does sharepoint include to accomplish that.
    A couple of more questions on the above:
    1. Is there any limitation to the size of the file that I can upload via the restful call?
    2. Is there any limitation to the number of files that I can upload via the restful call?
    3. What are the performance characteristics of bulk upload of files?
    4. Does the client side sharepoint 2013 javascript library support buld upload of files.
    5. What happens if a there is a failure in uploading one of the files.. after a few have been during the bulk upload?
    6. What about bulk upload of other (non-file) data?
    Thanks
    Naresh

    Thanks for pointing out Dave. I will look into the link that you sent...
    could you also tell me, if the javascript client library also support this (say I'm writing code to run on a non-windows platform). Also assume that I have the sharepoint hosted on-premise.
    Naresh

  • Unable to save files via WebDAV into portal

    My Windows Explorer client is running on a windows 2000 environment.
    We have set up webDAV to be able to save files directly in to portal from Windows Explorer. I cannot get this to work.
    I have a connection and can browse all pages in portal via Win Explorer, and also open files and save them back. I can also drag and drop files into portal from other folders on our file server. When I try to save directly though from word or when downloading from other server directly into portal, I get error message: "You cannot save into the folder specified. Please choose another location."
    Thankful for help.

    What version are you on? In 9.0.2.6, more detailed error messages are written to the WebDAV user's personal page (if one exists). Look there to see what the problem is.
    If you're using 9.0.2, I recommend upgrading to 9.0.2.6 (or 9.0.4 when available). The WebDAV feature in particular is much more stable in that release.
    Upgrade information is at http://portalcenter.oracle.com/upgrades.
    Regards,
    Jerry
    PortalPM

  • Problems uploading big files via FTP and downloading files

    I've been having problems uploading big files like video files (.mov 12MB) via FTP to my website (small files like .html or .doc I can upload but it takes longer than usual). I'm using Fetch 4.0.3. as FTP. Same problems when downloading files via Bit Torrent. I recently moved to Spain, since then I seem to have the problem. But my roommate with a PC doesn't have that problem. Connecting to internet with Ethernet cable also didn't resolve the problem. I also tested it from a Starbucks coffee connecting to Internet from there but still couldn't upload that 12MB file to the FTP. The security settings for firewall are set to "allow all incoming connections". I didn't change any of my settings so I don't know what the problems could be. I have a MacBook Pro, Mac OS X (10.5.7) Any suggestions? Thanks!

    Welcome to Apple Discussions!
    Much of what is available on Bittorrent is not legal, beta, or improperly labelled versions. If you want public domain software, see my FAQ*:
    http://www.macmaps.com/macosxnative.html#NATIVE
    for search engines of legitimate public domain sites.
    http://www.rbrowser.com/ has a light mode that supports binary without SSH security.
    http://rsug.itd.umich.edu/software/fugu/ has ssh secure FTP.
    Both I find are quick and a lot more reliable than Fetch. I know Fetch used to be the staple FTP program, but it grew too big for my use.
    - * Links to my pages may give me compensation.

  • Upload PDF Files via Drag n Drop in OAWD

    Hi All,
    We have a requirement to Enable Financial Services OAWD workflow inboxes to accept PDF invoice files via u2018Drag & Dropu2019 functionality. The current configuration only allows TIFF and FAX invoice files to be loaded by u2018Drag & Dropu2019.
    So can anubody tell me the steps to modify these inboxes to accept PDF files , currently they accept only TIFF and FAX Files.
    Thanks & Regards,
    Loveena.

    1. The screen on the mini is less than an inch larger than the Nexus. Not sure if that's what you are looking for.
    2.  Transferring files is as it has always been: through iTunes.   Music files must be synced using iTunes and can only be played in the Music App.
    3. For transfer of other types of files you can use either iTunes Sharing or a 3rd party App that supports other means of sending files.
    iOS: About File Sharing
    http://support.apple.com/kb/ht4094
    You'll need an App that can handle the type of file you want to transfer.
    Due to the way the file system is on an iPad direct drag and drop is not possible.  The iPad unliike android OS has no file system that is user accessible, as such all files must be associated with an App, and recide within that app's closed off file area.
    This is the main reason there are no viruses on an iPad.

  • Uploading a File via Web Services

    We can't seem to find a way to upload a file without needing
    to POST it to a specific page on the web server. On top of that, it
    apparently also creates a new session in Asp.NET when we do the
    post. How do you guys work around this issue?

    I have solved the problem - for future references or for anybody else having the same problem read below:
    The JavaDoc for HttpOutputStream states the following:
    "There are two constructors for this class, one taking a length parameter, and one without any parameters. If the stream is created with a length then the request will be sent with the corresponding Content-length header and anything written to the stream will be written on the socket immediately. This is the preferred way. If the stream is created without a length then one of two things will happen: if, at the time of the request, the server is known to understand HTTP/1.1 then each write() will send the data immediately using the chunked encoding. If, however, either the server version is unknown (because this is first request to that server) or the server only understands HTTP/1.0 then all data will be written to a buffer first, and only when the stream is closed will the request be sent."
    Constructing the HttpOutputStream with the size of the content to upload solved the problem. I guess the HTTP version was unknown or Oracle only understands HTTP/1.0 (anybody that can clear this up?), causing everything to be buffered (in memory) only to be send when the streams was closed, which in the case of a big file caused OutOfMemeryError.

  • Can u upload .htm file via portal app

    i have developed a simple webcenter portal application (11.1.1.6)
    i also have UCM 11.1.1.6
    I am able to see contribution folder in my portal app.
    Is it possible to upload a local file (c:\sample.htm) from my webcenter portal app TO ucm ???
    If yes, then what is the taskflow i should use. i used Folder Viewer and Document Explorer and try upload this htm it gives me a popup with
    info ---  Unable to upload document why ?
    thx

    Did you check the following documentation -
    http://docs.oracle.com/cd/E21764_01/webcenter.1111/e10148/jpsdg_doc_lib.htm#CIHCEACA
    Also check the section -29.5 Setting Parameters to Upload Files to Content Repositories
    where it is clearly mentioned -
    "The Document Manager task flow allows you to upload files into content repositories. Oracle WebCenter Framework uses Apache MyFaces Trinidad to handle file upload from a browser to the application server."
    and "To change the default settings of Apache MyFacesTrinidad, you can add three parameters to the web.xml file. To edit this file, open the ViewController project of your application. Under Web Content, open the web.xml file. In the Overview, navigate to Application > Context Initialization Parameters, then click the green plus (+) sign to add the parameters and their values (as described in Table 29-1) or simply update the code in the Source view. After you've made your changes, save the web.xml file, then restart Oracle JDeveloper.
    Table 29-1 Apache MyFaces Trinidad Parameters
    Parameter      Description
    UPLOAD_MAX_MEMORY
    The maximum amount of memory in kilobytes that a single file can use when uploaded.
    UPLOAD_MAX_DISK_SPACE
    The maximum amount of disk space in kilobytes that a single file can use when uploaded.
    UPLOAD_TEMP_DIR
    The directory in which the file being uploaded is temporarily stored.
    Provide the necessary information.
    Hope it helps you to resovle the problem.
    Regards,
    Hoque

  • Uploading big files via http post to XDB table

    Hello,
    I ve created a web form for to upload files as blobs to the database using XML DB, DBPS_EPG package and preconfigured DAD.
    The issue is that small files (~10kb) are being uploaded ok, but file which is 100K during http post returns connection reset from the server side.
    To my opinion there might be some max file size parameter for oracle server to accept during oracle listener tcp connection (as apach has maxrequestlimit).
    Is there any workaround for to load large files to the XDB table via webform?
    Here is a piece of code:
    CREATE USER web IDENTIFIED BY web_upload;
    ALTER USER web DEFAULT TABLESPACE XML_DATA;
    ALTER USER web QUOTA UNLIMITED ON XML_DATA;
    ALTER USER web TEMPORARY TABLESPACE TEMP;
    GRANT CONNECT, ALTER SESSION TO web;
    GRANT CREATE TABLE, CREATE PROCEDURE TO web;
    ALTER SESSION SET CURRENT_SCHEMA = XDB;
    BEGIN DBMS_EPG.CREATE_DAD('WEB', '/upload/*'); END;
    BEGIN
        DBMS_EPG.SET_DAD_ATTRIBUTE('WEB', 'database-username', 'WEB');
        DBMS_EPG.SET_DAD_ATTRIBUTE('WEB', 'document-table-name', 'uploads');
        DBMS_EPG.SET_DAD_ATTRIBUTE('WEB', 'nls-language', '.al32utf8');
        DBMS_EPG.SET_DAD_ATTRIBUTE('WEB', 'default-page', 'upload');
        COMMIT;
    END; 
    ALTER SESSION SET CURRENT_SCHEMA = SYS;
    CREATE TABLE web.uploads (
        name VARCHAR2(256) NOT NULL
            CONSTRAINT pk_uploads PRIMARY KEY,
        mime_type VARCHAR2(128),
        doc_size NUMBER,
        dad_charset VARCHAR2(128),
        last_updated DATE,
        content_type VARCHAR2(128) DEFAULT 'BLOB',
        blob_content BLOB
    CREATE OR REPLACE PROCEDURE web.upload
    AS
      url VARCHAR2(256) := 'http://demo.test.com:9090/upload/uploaded';
    BEGIN
        HTP.P('<html>');
        HTP.P('<head>');
        HTP.P('  <title>Upload</title>');
        HTP.P('</head>');
        HTP.P('<body>');
        HTP.P('  <h1>Upload</h1>');
        HTP.P('  <form method="post"');
        HTP.P('      action="' || url || '"');
        HTP.P('      enctype="multipart/form-data">');
        HTP.P('    <p><input type="file" name="binaryfile" /></p>');
        HTP.P('    <p><input type="file" name="binaryfile" /></p>');
        HTP.P('    <p><button type="submit">Upload</button></p>');
        HTP.P('  </form>');
        HTP.P('</body>');
        HTP.P('</html>');
    END;
    CREATE OR REPLACE PROCEDURE web.uploaded (
        binaryfile OWA.VC_ARR
    AS
    BEGIN
        HTP.P('<html>');
        HTP.P('<head>');
        HTP.P('  <title>Uploaded</title>');
        HTP.P('</head>');
        HTP.P('<body>');
        HTP.P('  <h1>Uploaded</h1>');
        FOR i IN 1 .. binaryfile.COUNT LOOP
            IF binaryfile(i) IS NOT NULL THEN
                HTP.P('  <p>File: ' || binaryfile(i) || '</p>');
            END IF;
        END LOOP;
        HTP.P('</body>');
        HTP.P('</html>');
    END;
    /帖子经 anatoly编辑过

    Welcome to Apple Discussions!
    Much of what is available on Bittorrent is not legal, beta, or improperly labelled versions. If you want public domain software, see my FAQ*:
    http://www.macmaps.com/macosxnative.html#NATIVE
    for search engines of legitimate public domain sites.
    http://www.rbrowser.com/ has a light mode that supports binary without SSH security.
    http://rsug.itd.umich.edu/software/fugu/ has ssh secure FTP.
    Both I find are quick and a lot more reliable than Fetch. I know Fetch used to be the staple FTP program, but it grew too big for my use.
    - * Links to my pages may give me compensation.

  • WebLogic Apache bridge problems on uploading large files via HTTP post

    I have a problem uploading files larger than quarter a mega, the jsp
    page does a POST
    to a servlet which reads the input stream and writes to a file.
    Configuration: Apache webserver 1.3.12 connected to the Weblogic 5.1
    application server
    via the bridge(mod_wl_ssl.so) from WebLogic Service pack 4.
    The upload goes on for about 30 secs and throws the following error.
    "Failure of WebLogic APACHE bridge:
    IO error writing POST data to 100.12.1.2:7001; sys err#: [32] sys err
    msg [Broken pipe]
    Build date/time: Jul 10 2000 12:29:18 "
    The same upload(in fact I uploaded a 8 MEG file) using the
    Netscape(NSAPI) WebLogic
    connector.
    Any answers would be deeply appreciated.

    I have a problem uploading files larger than quarter a mega, the jsp
    page does a POST
    to a servlet which reads the input stream and writes to a file.
    Configuration: Apache webserver 1.3.12 connected to the Weblogic 5.1
    application server
    via the bridge(mod_wl_ssl.so) from WebLogic Service pack 4.
    The upload goes on for about 30 secs and throws the following error.
    "Failure of WebLogic APACHE bridge:
    IO error writing POST data to 100.12.1.2:7001; sys err#: [32] sys err
    msg [Broken pipe]
    Build date/time: Jul 10 2000 12:29:18 "
    The same upload(in fact I uploaded a 8 MEG file) using the
    Netscape(NSAPI) WebLogic
    connector.
    Any answers would be deeply appreciated.

  • How to upload excel fiel with 'FileUpload' UI element ?

    Hi,
       my customer donot want to upload excel in CSV format. And how could i convert excel file into my internal table?
    BR.

    For converting excel file to internal table you can use the fm GUI_DOWNLOAD.
    Also refer to the below post. It may be helpful to you. Thanks.
    [Conversion of internal table into excel file format &put it on app server;

  • Urgent : Help me Upload a file via FTP using URL

    Hi
    I am having a problem with an error (The system cannot find the file specified)
    The files FTPPut.java and TESTING.txt are both in /src directory.
    import java.net.*;
    import java.io.*;
    public class FTPPut {
         public static void main(String[] argv)throws Exception{
         int BUFFER = 1024;
         URL url = new URL("ftp://ftp.scit.wlv.ac.uk/pub/");
         File filetoupload = new File("TESTING");
         URLConnection urlc = url.openConnection();
         byte data[] = new byte[BUFFER];
         FileInputStream fis = new FileInputStream(filetoupload);
         BufferedInputStream bis = new BufferedInputStream(fis, BUFFER);
         OutputStream os = urlc.getOutputStream();
         int count;
         while ((count = bis.read(data, 0, BUFFER)) != -1) {
         os.write(data, 0, count);
         System.out.println("uploaded sucessfully...");
         bis.close();
         os.close();
    Exception in thread "main" java.io.FileNotFoundException: TESTING (The system cannot find the file specified)
         at java.io.FileInputStream.open(Native Method)
         at java.io.FileInputStream.<init>(FileInputStream.java:106)
         at FTPPut.main(FTPPut.java:11)
    Edited by: AceV on Jan 10, 2008 7:28 AM

    import java.net.*;
    import java.io.*;
    public class FTPPut {
         public static void main(String[] argv)throws Exception{
         int BUFFER = 1024;
         URL url = new URL("ftp://ftp.scit.wlv.ac.uk/pub/");
         File filetoupload = new File("TESTING");
         URLConnection urlc = url.openConnection();
         byte data[] = new byte[BUFFER];
         FileInputStream fis = new FileInputStream(filetoupload);
         BufferedInputStream bis = new BufferedInputStream(fis, BUFFER);
         OutputStream os = urlc.getOutputStream();
         int count;
         while ((count = bis.read(data, 0, BUFFER)) != -1) {
         os.write(data, 0, count);
         System.out.println("uploaded sucessfully...");
         bis.close();
         os.close();
    }

  • Single Sign-On Error while uploading file via WEBADI

    Hello,
    I am getting error while uploading the file via WEBADI. Below is the error message.
    Error Message:
    The Single Sign-On server registration is invalid. Please contact the System Administrator.
    I noticed that this template is uploading data when I connect to Oracle applications and go to WEB ADI responsibility and create a new template.
    In order to make this WEBADI work do I have to create a new template each time I upload the file?
    Our goal is to use the same template, change the numbers and re load it.
    Also, Is there any way I can go to login screen when I click on UPLOAD under ORACLE in excel. That way connection is established.
    Thanks for the help.

    Hi, Actually NW Portal and SQL server has been installed on the same machine.
    Now I am trying to add my SQL server as a JDBC system and checking the connections and I do not see a property under User Management.
    When I try to connect to R/3 backend system "...Dedicated Application server" then I can see the property but not for the JDBC syste.
    any clue how to get rid of the error and to check the connection.
    Thanks in advance.
    Gopi m.

  • I am unable to upload files via web browser

    Good morning
    I have just upgraded to Mavericks (10.9.5), and I am running into a weird issue. I am unable to upload any files via the web browser. If I go to a website, and select an Upload File option, I am taken to Finder, where I am able to select the file, and press attach. The issue comes when I press upload on the website. It always either times out, or gives me an error that I was disconnected from the server. This happens on Safari, Firefox, and Chrome. I'm not sure what to do... I've repaired disk permissions and tried a lot of different security settings, but I am stumped.
    Thank you

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    The title of the Console window should be All Messages. If it isn't, select
              SYSTEM LOG QUERIES ▹ All Messages
    from the log list on the left. If you don't see that list, select
              View ▹ Show Log List
    from the menu bar at the top of the screen. Click the Clear Display icon in the toolbar. Then take one of the actions that you're having trouble with. Select any messages that appear in the Console window. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    The log contains a vast amount of information, almost all of which is irrelevant to solving any particular problem. When posting a log extract, be selective. A few dozen lines are almost always more than enough.
    Please don't indiscriminately dump thousands of lines from the log into this discussion.
    Please don't post screenshots of log messages—post the text.
    Some private information, such as your name, may appear in the log. Anonymize before posting.

Maybe you are looking for

  • Looking for a Google Apps replacement

    We need business collaboration tools for our XServe. We are currently using Google apps to edit docs and spreadsheets and need to bring the data in-house. What is available that offers the same functionality? The key feature is multi-user edting.

  • What's wrong with my macbook pro?

    this problem has only been noticable for the last couple of months or so. i have a late-2010 macbook pro, 2.4 ghz intel core 2 duo, 4 gigs of RAM. recently it has been extremely glitchy and sometimes, almost unusable. i will use it for 20-30 minutes

  • How do I manually change the genre or track name

    I'm new here, so forgive me if this is easily done. I would like to know how to manually change a song's track name, or genre in iTunes. If i feel like a song is more appropriately labeled "pop" vs "rock" can I change the label? Any help would be gre

  • Default hostnameverifier always returns false ...

    Hi, I am trying to run wsdl2java by supplying an https URL. The JVM args that I am using are: javax.net.ssl.trustStore=E:/Romil/projects/AirDeccanPlugin/localhost.ks java.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol On running wsdl2jav

  • Firefox for Mac OS 10.5 should be updated. I have OS 10.5.8. Do I need to upgrade?

    Firefox for Mac OS 10.5 should be updated. I have OS 10.5.8. Do I need to upgrade?