Filename of uploaded file through messageFileUpload in table

Hi,
i have a table bean on a page where there is a single column of type messageFileUpload. User can add rows to table and upload files to db table containing columns file_name (varchar2) and file_data (blob). How can i populate the db table column file_name with the name of the file choosen by the user?
If i do not use table (just a single messageFileUpload component) then on form submit in processFormRequest i can use String fileName = pageContext.getParameter("FileData"); to get the name of file, but waht to do with a messageFileUpload in a table?
Edited by: user12086842 on 01.01.2013 3:46

Thanks for reply.
I replaced messageFileUpload (binded to blob table column) with messageStyledText (binded to filename attribute). Above the table placed single messageFileUpload and submitButton nearby. After user select file on submit I do:
*if (pageContext.getParameter("DoUploadButton") != null) {*
.. DataObject fileUploadData = pageContext.getNamedDataObject("FileData");
.. *if (fileUploadData != null) {*
.... String fileName = (String)fileUploadData.selectValue(null, "UPLOAD_FILE_NAME");
.... String contentType = (String)fileUploadData.selectValue(null, "UPLOAD_FILE_MIME_TYPE");
.... BlobDomain fileContent = (BlobDomain)fileUploadData.selectValue(null, fileName);
.... String seqNumber = pageContext.getParameter("seqNumber");
.... am.insertInstanceAttachRowBlob(seqNumber, fileName, fileContent, contentType);
.... pageContext.removeNamedDataObject("FileData");
.. return;
Edited by: user12086842 on 02.01.2013 2:41

Similar Messages

  • Help with uploading files through form

    Hey,
    I have a website for a sign business and I'm trying to make
    it so people can upload custom artwork. I am using an ASP Formmail
    script from I think it's www.brainjar.com. If I understood
    correctly from the directions, I can't upload files through that
    script and I tried it once and it did not work. If anyone has any
    ideas then please help. Thanks
    Jeremy

    For security reasons many shared hosts don't permit file
    uploads.
    Try this in the interim
    http://www.yousendit.com/
    --Nancy
    "dayencom" <[email protected]> wrote in
    message
    news:epo2ql$dsb$[email protected]..
    > I just tried contacting my hosting provider:
    www.ixwebhosting.com and the
    guy
    > was not helpful at all. He said that their hosting does
    not support
    uploading
    > files. So I am drawing a blank now. Is there any way to
    use maybe another
    site
    > to upload?
    >

  • NMH410 as a external hard drive & upload files through web browser

    Hi,
    I had just installed a NMH410 and has some questions as follow:
    Can NMH410 be used as an external HDD without internet?
    Is there anywhere I can upload files through the web browser?

    mosidiot wrote:
    I had just installed a NMH410 and has some questions as follows:
    1. Can NMH410 be used as an external HDD without internet?
    Yes - The NMH is a local network device, and you can store/retrieve files on it using the computers on your home network using either Windows Explorer, or connecting to it in Linux/MacOS as a Samba share.
    However: The NMH requires an Internet connection to dowload firmware updates, and - If my experiences today are anything to go on - You'll need to have up to date Flash support in your web browser to be able to configure and administrate the thing.
    (See the new thread that I'll be posting in this forum shortly.)
    mosidiot wrote:
    2. Is there anywhere I can upload files through the web browser?
    Yes - The NMH does support uploading via a web browser as long as the latter has a recent Flash plugin installed. For small numbers of files, this should work fine...But for larger numbers of files, I'd suggest using either Windows Explorer, or the Media Importer program that came on the enclosed CD-ROM. :-)
    You can find full details and instructions for doing both of the above in the NMH 4xx user guide, which may be downloaded Here. :-)
    Farewell... >:-)
    +++ DieselDragon +++
    Edit: Corrected broken link to user guide.

  • File uploading file through RFC

    Hi All ,
    I am trying to upload file using FM GUI_Upload ,its working fine when i run in sap , But throws a Dump if the  file path is passed from .net . The same file path when i pass it in sap directly it works fine .
    the error :
    OBJECTS_OBJREF_NOT_ASSIGNED in FM DP_CONTROL_ASSIGN_TABLE
    Any Help will be great .
    Thanks
    Vinay

    Hi use this
    reward if help
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    FILENAME = FILENAME
    FILETYPE = 'ASC'
    TABLES
    DATA_TAB = BUFFER
    EXCEPTIONS
    FILE_WRITE_ERROR = 1
    NO_BATCH = 2
    GUI_REFUSE_FILETRANSFER = 3
    INVALID_TYPE = 4
    NO_AUTHORITY = 5
    UNKNOWN_ERROR = 6
    HEADER_NOT_ALLOWED = 7
    SEPARATOR_NOT_ALLOWED = 8
    FILESIZE_NOT_ALLOWED = 9
    HEADER_TOO_LONG = 10
    DP_ERROR_CREATE = 11
    DP_ERROR_SEND = 12
    DP_ERROR_WRITE = 13
    UNKNOWN_DP_ERROR = 14
    ACCESS_DENIED = 15
    DP_OUT_OF_MEMORY = 16
    DISK_FULL = 17
    DP_TIMEOUT = 18
    FILE_NOT_FOUND = 19
    DATAPROVIDER_EXCEPTION = 20
    CONTROL_FLUSH_ERROR = 21
    OTHERS = 22

  • Problem in uploading file through API

    I want to upload files in to mycontent folder through our
    application.After each steps followed, i get the status message ok
    from the server, but file is not uploaded. Is there any idea about
    this? Please help.

    what do you mean exactly with 'the file is not uploaded'?
    you checked in the content directory and the file isn't
    there?
    if so, could you please post your server side upload
    code?

  • Get filesize and filename of uploaded file

    Hello -
    I am somewhat of a newbie and am need of some assistance.  I am using ADT to upload a file and save to a database along with its filename and filesize.  The file uploads fine, but the filename and size are not being recorded in the database. Other fields that are part of the upload form save to the dB fine.
    Here's the basic code:
    // Add columns
    $ins_UserBackgroundPapers->addColumn("FileContainer", "FILE_TYPE", "FILES", "FileContainer");
    $ins_UserBackgroundPapers->addColumn("FileName", "STRING_TYPE", "POST", "FileName");
    $ins_UserBackgroundPapers->addColumn("FileSize", "STRING_TYPE", "POST", "FileSize");
    <form name="form1" method="POST" id="form1" action="<?php echo $editFormAction; ?>" enctype="multipart/form-data">
         <input type="file" name="FileContainer" id="FileContainer" size="32" />
         <input name="FileName" id="FileName"  type="hidden" value="<?php echo $HTTP_POST_FILES['FileContainer']['name']?>" />
         <input name="FileSize" id="FileSize" type="hidden" value="<?php $HTTP_POST_FILES['FileContainer']['size'];?>" />
         <input class="submit" type="submit" name="KT_Insert1" id="KT_Insert1" value=";Upload"/>
    </form>
    I've also tried using $_FILES["FileContainer"]["name/size"] with no luck.
    Any help would be much appreciated. I'm desperate!
    Thanks.

    I think the main issue is that the file name does - unlike expected - not get stored in the FileContainer column, but I don´t have any idea why this happens without seeing the complete code of the page in question.
    In regards to retrieving the file size:
    Those hidden fields you´re trying to make use of:
         <input name="FileName" id="FileName"  type="hidden" value="<?php echo $HTTP_POST_FILES['FileContainer']['name']?>" />
         <input name="FileSize" id="FileSize" type="hidden" value="<?php $HTTP_POST_FILES['FileContainer']['size'];?>" />
    ...can´t capture the additional info you want, because the very moment the form data gets submitted, the file itself has not neccesarily been uploaded yet, in particular when ADDT´s File Upload trigger has been set to AFTER -- and it´s important to consider that the $HTTP_POST_FILES[] values are assigned at the server side and not by the browser anyway.
    However, additional information such as the size of an uploaded file doesn´t need to be stored anyway, because such information is easily retrievable by using the PHP function "filesize": http://de.php.net/filesize
    Cheers,
    Günter
    P.S: $HTTP_POST_FILES[] is deprecated since PHP version 4.1.0 -- better use $_FILES instead: http://us3.php.net/manual/en/reserved.variables.files.php

  • Unknown File Format Error while Uploading file through SFP in Note Implemen

    Hello All,
    I am implementing SAP Note 1528165 - Form 16: Layout changes for financial year 2010-11 which has few PDF forms to be uploaded.
    While doing the manual steps given in the attachment; I am getting following error.
    Error occurred when uploading file (unknown file format)
    Message no. FPUIFB068
    Manual step listed in the attachment is given below:
    Step 6 u2013 Creation of PDF form HR_INTAXF162006_600
    a) Download attached file 'SFPF_HR_INTAXF162006_600.zip' on the local file system.
    b) Unzip the .zip file
    c) Execute transaction code 'SFP'.
    d) Enter 'Form' as 'HR_INTAXF162006'.
    e) Goto menu bar and select the 'Utilities' option and select 'Uploading form' from menu.
    f) Select the file, downloaded in the step u2018bu2019 (SFPF_HR_INTAXF162006_600.XML) from the local
    file system.
    g) Save the form and activate the same.
    Please help/suggest.
    Thanks in advance.
    Arti Dobariya

    Hi,
    ADS has to be configured to perform those manual steps.
    Please check the note 1580196 GTS: Error occurred when uploading file
    (unknown file format).
    The manual steps related to SFP transaction need to be performed if your are running the form 16 in pdf format.
    Since ADS was not configured in our system; we end up using  the option of running form 16 in SAP Script.
    Changes related to SFP transaction need not be perfored in case you are running the form in SAP Script format as these are pdf specific changes.
    Regards,
    Arti

  • Unknown File Format Error while Uploading file through SFP

    Hello All,
    I am implementing SAP Note 1528165 - Form 16: Layout changes for financial year 2010-11 which has few PDF forms to be uploaded.
    While doing manual steps given in the attachment; I am getting following error.
    Error occurred when uploading file (unknown file format)
    Message no. FPUIFB068
    Manual step listed in the attachment is given below:
    Step 6 u2013 Creation of PDF form HR_INTAXF162006_600
    a) Download attached file 'SFPF_HR_INTAXF162006_600.zip' on the local file system.
    b) Unzip the .zip file
    c) Execute transaction code 'SFP'.
    d) Enter 'Form' as 'HR_INTAXF162006'.
    e) Goto menu bar and select the 'Utilities' option and select 'Uploading form' from menu.
    f) Select the file, downloaded in the step u2018bu2019 (SFPF_HR_INTAXF162006_600.XML) from the local
    file system.
    g) Save the form and activate the same.
    Please help/suggest.
    Thanks in advance.
    Arti Dobariya

    Hi,
    ADS has to be configured to perform those manual steps.
    Please check the note 1580196 GTS: Error occurred when uploading file
    (unknown file format).
    The manual steps related to SFP transaction need to be performed if your are running the form 16 in pdf format.
    Since ADS was not configured in our system; we end up using  the option of running form 16 in SAP Script.
    Changes related to SFP transaction need not be perfored in case you are running the form in SAP Script format as these are pdf specific changes.
    Regards,
    Arti

  • Uploading files through HTTP

    Hi All.
    I am trying to create a moduel for uploading files to a web server using HTTP multipart encripted request.
    Well, generally it works, but it is very very slow, and sometimes, with large files (15 MB and above) it gets stuck !
    I did not write the multipart parser myself, but downloaded it, and I tried several implementations, and they all have the same problems.
    I am using IBM WebSphere (3.5.5) with IBM HTTP Server as app/web server.
    My questions are:
    1.
    ===
    Is the HTTP protocol should be able to upload file with (theoretically) any size (maybe I am trying to do something that is not possible...) ?
    2.
    ===
    Does the servlet engines receive ALL the request object before handling the servlets methods (i.e. wll the file be uploaded to the memory first, and only then can be written to the disk) ?
    Thanks a lot, Udi

    The code for client is :
         fileinputstream = new FileInputStream(s);
                   byte abyte0[] = new byte[fileinputstream.available()];
                   fileinputstream.read(abyte0);
                   URL url = new URL(s2 + "artius.rgm.rater.RaterServlet");
                   URLConnection urlconnection = url.openConnection();
                   urlconnection.setDoOutput(true);
                   urlconnection.setDoInput(true);
                   urlconnection.setUseCaches(false);
                   objectoutputstream = new ObjectOutputStream(urlconnection.getOutputStream());
                   objectoutputstream.writeObject(abyte0);
                   objectoutputstream.close();
                   objectinputstream = new ObjectInputStream(urlconnection.getInputStream());
                   Hashtable hashtable = (Hashtable)objectinputstream.readObject();
    And server is :
              out = new ObjectOutputStream(response.getOutputStream());
              in =new ObjectInputStream(request.getInputStream());
              byte[] b =(byte[])in.readObject(); //hangs here.
    Pradeep

  • Get filename from uploaded file then place in input tags

    i have an upload feature with the use of upBean and i can get the filname thru filename=file.getFileName
    when i place in the input tags it takes an error what i suppose to do
    <input type="hidden" name="getfilename" value="<%=filename%>">
    if (MultipartFormDataRequest.isMultipartFormData(request)) {
                            // Uses MultipartFormDataRequest to parse the HTTP request.
                            MultipartFormDataRequest mrequest = new MultipartFormDataRequest(request);
                            String todo = null;
                            String filename=null;
                            String description=request.getParameter("txtDesc");
                            String checkfilename=mrequest.getParameter("uploadfile");
                            if (mrequest != null) todo = mrequest.getParameter("todo");
                            if ( (todo != null) && (todo.equalsIgnoreCase("upload")) ) {
                                Hashtable files = mrequest.getFiles();
                                if ( (files != null) && (!files.isEmpty()) && (description!=null)) {
                                    UploadFile file = (UploadFile) files.get("uploadfile");
                                    if (file != null){
                                        filename=file.getFileName();                                    if(checkfilename==null){
                                            filename="";
                                  upBean.store(mrequest, "uploadfile");  // Uses the bean now to store specified by jsp:setProperty at the top.
                                             else out.println("<BR> todo="+todo);
                    %>
                    Message was edited by:
    BlingBling15

    Thanks for reply.
    I replaced messageFileUpload (binded to blob table column) with messageStyledText (binded to filename attribute). Above the table placed single messageFileUpload and submitButton nearby. After user select file on submit I do:
    *if (pageContext.getParameter("DoUploadButton") != null) {*
    .. DataObject fileUploadData = pageContext.getNamedDataObject("FileData");
    .. *if (fileUploadData != null) {*
    .... String fileName = (String)fileUploadData.selectValue(null, "UPLOAD_FILE_NAME");
    .... String contentType = (String)fileUploadData.selectValue(null, "UPLOAD_FILE_MIME_TYPE");
    .... BlobDomain fileContent = (BlobDomain)fileUploadData.selectValue(null, fileName);
    .... String seqNumber = pageContext.getParameter("seqNumber");
    .... am.insertInstanceAttachRowBlob(seqNumber, fileName, fileContent, contentType);
    .... pageContext.removeNamedDataObject("FileData");
    .. return;
    Edited by: user12086842 on 02.01.2013 2:41

  • Bdc upload file data into internal table problem with gui_upload fm

    Hello experts,
    my coding is like this ..
    data : begin of itab occurs 0 .
    field1 like mara-matnr,
    field2......
    etc,
    end of itab.
    data: file1 type string.
    parameter :file like rlgrap-filename.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR file.
    CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
    EXPORTING
    static = 'X'
    mask = space
    field_name = 'FILE'
    CHANGING
    file_name = file.
    START-OF-SELECTION.
    FILE1 = FILE . "HERE I AM PASSING INTO STRING
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = FILE1
    FILETYPE = 'ASC'
    has_field_separator = 'X'
    TABLES
    data_tab = itab. " here the data is not populating from the file , it is giving the error like speified table not found.
    HERE i am getting the message like "specified table name not recgonised" . the data is not populating into the itab from the file.
    file structure is same as the internal table.
    I stored the file as .txt( ie in notepad).
    my file is like this..
    10000 200 323 sunndarrr.......
    i had a problem with this bdc , i am getting like "specified table name not recgonised" in the fm gui_upload while debugging.
    when i am using the ws_upload it is working fine.
    please guide me where i have done the mistake.
    thank you so much for all the replies.

    Hi,
    Have a look on the following code.
    TABLES: kna1.
    DATA: BEGIN OF itab1 OCCURS 0,
          str(255),
          END OF itab1.
    DATA: itab2 TYPE kna1 OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'WS_UPLOAD'
      EXPORTING
        filename                = 'D:\ABAP EVE\ffile1.txt'
        filetype                = 'ASC'
      TABLES
        data_tab                = itab1
      EXCEPTIONS
        conversion_error        = 1
        file_open_error         = 2
        file_read_error         = 3
        invalid_type            = 4
        no_batch                = 5
        unknown_error           = 6
        invalid_table_width     = 7
        gui_refuse_filetransfer = 8
        customer_error          = 9
        no_authority            = 10
        OTHERS                  = 11.
    IF sy-subrc <> 0.
      WRITE:/ 'sorry'.
    ELSE.
      LOOP AT itab1.
        SPLIT itab1-str AT ',' INTO itab2-kunnr itab2-name1.
        APPEND itab2.
      ENDLOOP.
      IF sy-subrc = 0.
        LOOP AT itab2.
          WRITE:/ itab2-kunnr,itab2-name1.
          INSERT INTO kna1 VALUES itab2.
        ENDLOOP.
        IF sy-subrc = 0.
          WRITE:/ 'inserted'.
        ELSE.
          WRITE:/ 'not inserted'.
        ENDIF.
      ELSE.
        WRITE:/ 'fail'.
      ENDIF.
    ENDIF.
    Flat file:
    10001,Sadney
    10003,Yogesh
    20005,Madan
    1.U need to define internal table with one field of max size
    2.upload the flat file data into that internal table
    3.split that internal table data into another internal table(having fields)
    <REMOVED BY MODERATOR>
    thanks,
    Chandu
    Edited by: Alvaro Tejada Galindo on Apr 30, 2008 12:17 PM

  • Hod would I upload files through my soundcard???

    I have a minidisc player and need to upload midi files but it plugs in through the soundcard. anyone know how to go about this????

    Hello vin1215
    Input with a 3.5 mini stereo plug to the mic jack on the back of your iMac. Then use this > GarageBand Support Page or Garage Band Help to assist you in recording to your iMac.
    Also it would be a good idea to fill in the Model and OS X in your profile, not all Mac model are the same.
    Dennis
    17" iMac Intel Core Duo - 2GB Ram -   Mac OS X (10.4.10)   - Maxtor 300GB FireWire - Creative Inspire 2.1 - 2G Nano

  • How to upload files through a servlet/jsp form?

    anyone know basically how to do this?
    i need to write a simple jsp form the can browse for a file on my machine, then upload it to a server in the usual html form manner.
    is this done with an i/o stream?
    thanks for any help!
    robSmyth
    [email protected]

    jspSmart has a free upload component you can use for HTTP file uploading. (http://www.jspsmart.com )
    Also, O'Reilly has an open source package you can use. (http://www.oreilly.com or http://www.servlets.com )
    Another option is dotJ, which has an upload tag in its tag library. Benefit of this library is that it has a much more compehensive set of JSP tags. (http://www.dotjonline.com )

  • Change filename of uploaded file

    I am using fileupload from Apache common. Is there a way I can change file name of file being uploaded?

    Hi,
    I cannot see a workaround and doesn't appear possible as the system will only append the unique ID which cannot be customized at this stage. 
    Kind regards,
    -Sidney

  • Upload file through a popup in jspx page

    Hi,
    I am trying to upload a file using pop up on a jspx page. I have created a jspx page on which I have a pop up which is called on a command link click. This pop up have an input file component on it. When I select file and upload it and try to retrieve the file on jspx page it is null. I have tried to set this upoaded file inside a Simple POJO bean class which is serializable. I get the file name and type but get content of file as null.
    Anyone faced this problem or have implemented it then please help me.
    Thanks in advance
    Saurabh

    Thanks for thr reply.
    I have already set UsesUpload="true". The problem is I am not trying to put the inputfile component on the jspx itself rather I have kept this component on a pop up and from pop up I am trying to upload the file.
    Thanks
    Saurabh

Maybe you are looking for

  • Photo effects in flex app

    HI, I have implemented basic image effects into flex app, such as opacity, darkness etc.  I am looking for some advanced effects such as, paint, cartoon etc, ones you can find in fotoflexer.com or lunapic.com Can anybody suggest something? algorithms

  • HT203646 No bluetooth in yosemite

    I can't get bluetooth to work at all - won't find my mouse. this is more like a windoze update, where devices stop working yes, it's on, yes it works, yes I tried the power down for 2 minutes with all usb unplugged

  • Emergency Question Re: Aspect Ratio

    I'm shooting for the first time today with an HD Camera. I'm going to shoot in SD, but which aspect ratio? 16:9 or 4:3? I don't know what type of TV the video will ultimately be viewed on, but I'd like the flexibility for it to look great on both wid

  • How to copy tax procedure TAXINJ from Client 000 to Dev client in ECC 6.0

    Hi, We are facing a problem for TAXINJ and TAXINN procedure, which are not available in our development client, but available in client 000. Please advice how to copy those procedures from client 000 to development client. (In client 000, we can not

  • Ctrl-Shift-Click to open link in new tab (v10)

    I came back to Firefox recently after trying to use Chrome for awhile. I was gratified by my return, except that in the update from v9 to v10, I found that one of my favorite keyboard shortcuts no longer worked as it had. In v9 and previous, Ctrl-Shi