Download an uploaded file

Hello everyone.
I've been working with SAP HANA for almost 2 months so I'm still learning it.
I made a file uploader in a page  with SAPUI5 file uploader, witch is working just fine.
But now I have to allow the user to download that file, and I do not know how to do it.
I save the file in a blob type into the database with its mime_type. I am trying to see the blob content but it returns a [object ArrayBuffer]
How Am I suppose to make that file to be downloaded? 

I've found out the solution.
I was setting a blob colum with setString() function at the prepare Statement instead of setBlob.
then
$.response.contentType = result[0].mime_type;
$.response.status = $.net.http.OK;
$.response.setBody(result[0].conteudo);

Similar Messages

  • How to download and upload files in Java?

    Hi, everyone
    How to download and upload files in Java? Do you have some references about this issue or some valuable web link�? Thanks!
    Best Regards,
    Hai.Ren

    This is too vague a question, please be more specific. What protocol would you like to use? HTTP? FTP? Something else?

  • Download and upload files

    Hi!
    I need to develop an application where the users want to be able do download a RTF document, modify it, and save it back into the application. I know how to download a RTF document, stored as a BLOB in a table, so the document opens in a new window and the user can change it. Now, I won't the user to save the file on the disk and then upload the file through the upload page in the application, but rather to just click "save" in MS Word and close it, and then somehow the file should automatically upload in the database. Does anyone ever created something like this, using some Java Applet on the client PC maybe?
    Thanks for help,
    Alen

    Hello Mradul
    Thanks for your answer. I deleted all history (both from
    Internet and flash player). Now I have no problem downloading files
    but Internet still crash when I uploading files (I have not tried
    the other suggetions). I use Vista 32-bits. Maby Acrobat.com, when
    using Flash player 10, requires Vista 64-bits to work without
    problem? What do you think.
    I read at Adobe troubleshooting about a similar problem; that
    Flash player causes Internet to crash or freeze. Maby I should
    inform Adobe support about my problem.
    Thanks
    Fredrik

  • Download and upload file

    in J2EE project,how can I upload a file and process it at server side,for ex.a picture,a text file(may be text need to be process)..
    how can I generete a file from server side,like .doc and user can download it

    Do a search for servlets generating MS Office files. There are packages that can generate .pdf, .xsl and .doc files.
    When users uploads file, you have access to file's name. Use filename extension to determine what kind of file it is.

  • OES2 NetStorage - unable to download or upload files

    OSE2 - SUSE Linux 10 SP3
    Settings.properties file contains
    ServerProtocol = http://
    ServerPort = 80
    ServerName = 192.219.64.11
    Users can login successfully.
    Users can download successfully if they double click on a file.
    Users cannot download if they click in the check box and then choose
    File | Download - Nothings seems to happen.
    User cannot upload file, there is a blank screen and nothing happens.
    Any thoughts?

    On 04/07/2011 20:06, ghislainmonfette wrote:
    > OSE2 - SUSE Linux 10 SP3
    >
    > Settings.properties file contains
    > ServerProtocol = http://
    > ServerPort = 80
    > ServerName = 192.219.64.11
    > Users can login successfully.
    > Users can download successfully if they double click on a file.
    > Users cannot download if they click in the check box and then choose
    > File | Download - Nothings seems to happen.
    > User cannot upload file, there is a blank screen and nothing happens.
    >
    > Any thoughts?
    Which web browser on which client OS are you using?
    Have you allowed pop-ups for the server running NetStorage?
    HTH.
    Simon
    Novell Knowledge Partner (NKP)
    Do you work with Novell technologies at a university, college or school?
    If so, your campus could benefit from joining the Novell Technology
    Transfer Partner (TTP) program. See novell.com/ttp for more details.

  • UIX XML & Download Of Uploaded Files.txt

    What is the right way (in UIX XML) to show the content of an uploaded file (retrieving it from a BC4J component)?
    Documentation, Samples?

    your question is rather vague; are you asking how to handle a fileUpload using the UIX controller? Please see the javaDoc for the class
    oracle.cabo.servlet.AbstractPageBroker

  • Downloading and uploading files from ftp server

    Hi everyone,
    I'm developping an web application. I would like to be able to download a file on a ftp server, edit and save it, and then upload it on the same server. How can I program that in JAVA?
    Thx

    Jayt1,
    HOW MANY TIMES ARE YOU GOING TO ASK THIS QUESTION?
    I just answered this question for someone lese yesterday. Someone replied to you before ans duggested you search through the postings before you actually post something. Good advice!
    Matt

  • Documents in the Cloud isn't downloading and uploading files

    Hello!
    I'm with a very annoying bug on my iCloud, actually, in Documents in the Cloud.
    The problem is so strange that's very hard to explain that in words. But let's give it a try: iCloud isn't uploading my files to the cloud at all. I already did everything like: enable/disable iCloud, delete my iWork apps and install it all again, delete all my iWork apps data from iCloud... but really NOTHING solves this. I even recorded a little video, it's more simple to show you what's happening here:
    http://www.youtube.com/watch?v=EpQ6wbFm6hM
    (the text is in portuguese but I think you guys will get the idea)
    Do anyone know what's happening and how to solve this? I called the brazilian AppleCare and the guys doesn't know what's happening too :/
    Thanks!
    Samuel Silva

    I tried viewing the video on my computer, it turns out it's a flash video and I was unable to watch it on my iPod.
    The problem with your documents are that they have become corrupt, you should delete them and start again. Of interest I note that you are not allowing the documents to fully upload before trying to open them on another device, once you have deleted all the documents from iCloud, I suggest leaving them until uploaded before trying to open them again.

  • Download and upload of file to server dir (AL11)

    Hello,
    I have a custom program that is downloading files from application server directory (they are like templates) to user local pc. User is then modifying such files and finally upload them in another AS directory.
    The program is currently making use of FM's C13Z_FILE_DOWNLOAD_BINARY and  C13Z_FILE_UPLOAD_BINARY.
    There was no problem until hot packages have been implemented: now such FM's are returning an error saying:
    Internal program error; (YDOWNLOAD SAPLC13Z 0 C13Z_RAWDATA_WRITE)
    When in debug, it appears that the FM C13Z_RAWDATA_WRITE (called by the above mentioned FM's) is checking the calling program (sy-cprog) and if this latter is not within a list of standard programs (hardcoded), then the error is thrown.
    My question is: Is there another way to download and upload files without such error? Could you please share the code?
    Thanks a lot for help and suggestions!
    Best regards,
    JFlanders

    Hello,
    Please see note   1809258 - Internal program error; ( <program name> SAPLC13Z 0 C13Z_RAWDATA_READ )
    A possibile solution is to use cl_gui_frontend_services class methods like gui_download and gui_upload, for instance:
    TYPES: t_line(1) type x.
    DATA: i_tab TYPE STANDARD TABLE OF t_line,
        i_wa(1) type x.
    OPEN DATASET lv_file_appl FOR INPUT IN BINARY MODE.
    DO.
      CLEAR i_wa.
      READ DATASET lv_file_appl INTO i_wa.
      IF SY-SUBRC <> 0.
        EXIT.
      ELSE.
        APPEND i_wa TO i_tab.
      ENDIF.
    ENDDO.
    CLOSE DATASET lv_file_appl.
    DATA: lv_fn TYPE string.
    lv_fn = lv_file_name.
    CALL METHOD cl_gui_frontend_services=>gui_download
      EXPORTING
        filename                = lv_fn
        filetype                = 'BIN'
        append                  = ' '
      CHANGING
        data_tab                = i_tab
      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                  = 24.
    * old functioanlity
    *    CALL FUNCTION 'C13Z_FILE_DOWNLOAD_BINARY'
    *      EXPORTING
    *        i_file_front_end       = lv_file_name
    *        i_file_appl            = lv_file_appl
    *        i_file_overwrite       = 'X'
    ** IMPORTING
    **    E_FLG_OPEN_ERROR          =  false
    **    E_OS_MESSAGE              =  lv_message
    *    EXCEPTIONS
    *      fe_file_open_error       = 1
    *      fe_file_exists           = 2
    *      fe_file_write_error      = 3
    *      ap_no_authority          = 4
    *      ap_file_open_error       = 5
    *      ap_file_empty            = 6
    *      OTHERS                   = 7
    This is for the download, similarly should be done for the upload.
    Hope this could help. Let me know if further details are needed.
    Thank you and bye,
    Flavio

  • SQL*Loader and unzipping with uploaded file

    hi, everybody
    i was trying to integrate some functionalities, today separated. i made a simple Apex page that uploads a file, and now i need to process that file.
    is there any way to process that uploaded file and load it onto a table, just like i'd do with Sql*Loader?
    in the same way, can i unzip an uploaded zip file, just like Oracle Portal 3.0.9 used to do in its contect areas with zip itens?
    thanks

    Hi, Ivo
    about ult_compress, ok. i'll check it out.
    talking about uploaded files, the only thing i've found were:
    a) download an uploaded file
    b) use an uploaded image to integrate in a web application.
    unfortunately, i didn't find anything that could help me process an uploaded text file the way i do with SQL*Loader.
    i'll keep on trying
    thanx

  • Error when downloading large audio files

    I purchased two audio files (.m4a) and got emailed the download links. One was 3.7MB and when I clicked the download link in the email on my iphone 4 it streamed. The other file was 76.8MB and when I clicked the link in the email on my iphone 4 I get a 'This operation cannot be completed' message.
    Both files could be downloaded fine on my computer.
    Does anyone know why this would be the case? And what I can do about it?

    Hi,
    Per my understanding, you might want to download the content of files into database in SharePoint Hosted App.
    In SharePoint Hosted App, as we can only use JavaScript which is supposed to be executed in browser, the content retrieved will be stored in memory then to the local hard drive.
    As a workaround, I suggest you develop a Provider Hosted App and do the same job there instead. In Provider Hosted App, we can use C# to handle the file downloading which should
    be more appropriate in your scenario.
    About
    how to download file using SharePoint Client Object Model:
    http://www.lucacostante.com/item/15-download-and-upload-files-via-sharepoint-client-object-model.html
    Thanks
    Patrick Liang
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Various ways of uploading files

    I've read about apache commons fileupload, o'reilly servlets, and the now discontinued smartupload.
    In the examples i've seen so far, the files are uploaded onto a local hard disk.
    Is there any reason for this? Security? Performance? Does this work if i have a remote user trying to download or upload files?
    I am trying do some file uploading and downloading. At first i had wanted to use a mysql database, storing the files as BLOB. But so far from what i've gathered, the common practise is to store it on hard disk instead.
    What does it mean by "mapping"? Is it the file location and directory? How do i store this information on a mysql database?
    What are the pros and cons of either options (storing on hard disk vs storing as blob field on mysql)? Thanks. And if you have experience in this, please share. Thanks again.
    EDIT: I'm currently trying the smartupload option. they work when its purely writing the file to hard disk. but when i run the example page on writing to mysql database. it does not work. I kept getting null pointer exceptions.
    <%@ page language="java" import="java.sql.*,com.jspsmart.upload.*"%>
    <jsp:useBean id="mySmartUpload" scope="page" class="com.jspsmart.upload.SmartUpload" />
    <HTML>
        <BODY BGCOLOR="white">
            <H1>jspSmartUpload : Sample 4</H1>
            <HR>
            <%
            // Variables
            int count=0;
            // Connect to the database
            //Class.forName("org.gjt.mm.mysql.Driver").newInstance();
            Class.forName("com.mysql.jdbc.Driver").newInstance();
            String url = "jdbc:odbc:Maintenance";
            Connection con = DriverManager.getConnection(url);
            // SQL Request
            Statement stmt = con.createStatement(ResultSet.TYPE_FORWARD_ONLY ,ResultSet.CONCUR_UPDATABLE);
            ResultSet rs = stmt.executeQuery("SELECT * FROM tfiles WHERE id=1");
            // if the resultset is not null
            if (rs.next()){
                // Initialization
                mySmartUpload.initialize(pageContext);
                // Upload
                mySmartUpload.upload();
                // upload file in the DB if this file is not missing
                if (!mySmartUpload.getFiles().getFile(0).isMissing()){
                    try {
                        rs.updateString("FILENAME",mySmartUpload.getFiles().getFile(0).getFileName());
                        // Add the current file in the DB field
                        mySmartUpload.getFiles().getFile(0).fileToField(rs,"FILE");
                        // Update
                        rs.updateRow();
                        count++;
                    } catch(Exception e) {
                        out.println("An error occurs : " + e.toString());
            // Display the number of files uploaded
            out.println(count + " file(s) uploaded in the database.");
            rs.close();
            stmt.close();
            con.close();
            %>
        </BODY>
    </HTML>Edited by: tsek1125 on Oct 17, 2007 9:41 PM. Code added.

    FileUpload can store files in memory only if they are small enough, you control yourself from what size they will be cached to disk.
    What you do after that with the file data is up to you, the upload API will provide you with an array of bytes only. You could story the entire file in the database, but why not only store the complete path to the file on disk? That saves unnecessary copying of bytes and when the files are on disk you can work with other tools on those files should you need too.

  • Upload and download of  excel file in the application server in background

    Hi all,
    i want to download the excel file from application server into internal table and after processing i have to upload to excel file in the application server in the background mode..
    i mean i'll schedule the program in background.
    im using FM ALSM_EXCEL_TO_INTERNAL_TABLE its working fine in fore ground but not in back ground.
    what method i have to follow ?

    Hi Ankit,
    I think this is not possible to open a Excel-File from the application server because the Excel format before Office 2007 where a binary format (Suffix: .xls). The newer Office file format (Suffix: xlsx) is a zipped XML Format. To read the binary Excel-Format you need an OLE Connection between SAP GUI and Office. But at the application server in background you doesn't have this OLE Connection.
    In my opinion you have two possibilities:
    1. Convert all files in the CSV format. This file format can be read with open dataset.
    2. Upload the files from the presentation server in forground. There are some funktion modules in the standard which can read the xls format. But they have some limits regarding the length of cells content.
    My recommendation is solution no. 1. If you know an VBA expert, he can write an Excel-macro which converts all Excel Files in the CSV-Fomat.
    Regards
    Dirk

  • Help~how can I download and upload pdf file in simple solution

    I am new doing Portal.
    I want to create a page which can provide download pdf file function and other page which can provide upload pfg file function.
    I created a link to download file, and implemented uploading files by access the file directory.
    Can this solution work in Portal?
    I've tried, but I couldn't access file directory through web_dav.
    Anyone can give me some suggestion?

    You can only install apps (programs) via the App Store app on your iPad, or by downloading them via iTunes store on your computer and then syncing them to your  iPad - you can't download and install programs from the internet via a browser, they are not compatible with the iPad.

  • File download and Upload using SOAP in Oracle ADF

    Hi Gurus,
    I have a requirement of Uploading and downloading a file on a location. It is for uploading and downloading an Attachments for a user. I have a table in my jspx page for showing the current attachments and an option to upload a new attachment. When I click on attachment name, the file should be downloaded.
    The current implementation does this using SOAP web service. Now, i need to do it with ADF now.
    For Uploading and downloading, i have used FileDownloadActionListner on my page. I am not able to figure out how to use SOAP service in ADF to download or upload a file. what i have done is
    1. Create WebService Data Control with the exposed wsdl.
    2. Created .jspx page and binded the fuctions to the button.
    3. In managed bean class, i have written code to get reference to that web service and invoke it. I am assuming of making the currect call as the response object is not coming as null.
    Now i need to know:
    1. How to verify for the success response from a SOAP web service in the managed bean code.
    2. how to go ahead with the implementation.
    For Upload: I have filename, content and mimetype in the managed bean code function. but how to use those to make a soap call and upload a file at the location.
    For Download: I have DocumentId in the managed bean code function, and how to use it to download a file. How to get the SOAP response in managed bean code and how to handle it.
    Thanks in Advance,
    regards,
    Rajan

    Hi,
    don't have an example, but I suggest to use a JAX-WS proxy client and access it from the POJO DC (instead the WS DC) so you have access to the service responses
    Frank

Maybe you are looking for

  • Where do I find the network extender page

    I am trying to find the page to manage my network extender and can't. I thought it was under My Verizon and my device but I can't find it. I am connected to it but only get one bar of service. I spoke with Verizon and they say it's defective but out

  • Prob in adding my gmail account to the "Mail" app

    hai.. Recently i am facing a prob in using MAIL appliction in my Macbook Pro. As I changed my gmail password using other device which I was using in MAIL app, now am not able to login using any( new / old) password. Please help me in this!

  • Safari 6.0.4 crash (See log)

    Since the Safari 6.0.4 update yesterday I can't use Safari properly. On every fill in form like Facebook, Apple Support forum etc. Safari crashes with the following crash log: http://pastebin.com/raw.php?i=qigk20Gm I'm using ML 10.8.3 with Safari 6.0

  • Spilled coffee on a MacBook Pro

    I accidentally spilled some coffee on my macbook pro.  Now, the top right keys are a little bit sticky and the lights for those keys do not work?  Can this be fixed? Will it be expensive?

  • Error when update to OS4.2 solved in win7

    I got an error in Itunes when i tried to updated my firmware from 4.1->4.2 *My software:* Win 7 Itunes 10.1.0.54 Zonealarm PRO Tried several times to update, changed to a different USB hub, restarted Itunes, rebooted computer and nothing worked to so