Changing filename when downloading generated file

The scenario:
There is a list of files that logged in users are able to download. The files themselves are not kept within the web root, as we need to be able to ensure that a user has rights to download the file. To do this I have created a JSP page which (a) checks that the user is logged and has appropriate permissions, (b) sets the content type to something the browser does not understand (to ensure the file, which is basically just text is downloaded instead of just displayed in the browser) and (c) gets and includes the content of the file using java.io.File.
The problem:
... with this approach is that it uses a link which looks something like thefile.snd. This means that the file name in the save dialogue always defaults to 'getfile.jsp', when it needs to default to 'thefile.snd'.
Any ideas? I've considered using an signed applet to do the download and rename the file but would like to avoid this if possible (although if anyone has the source for such an applet that would also be helpful).

Thanks for the post clem. FYI, I had a similar problem but my data was coming from a database - not a file on disk. At first, setting the content-disposition wasn't working. Then I removed the "file; " part and left just
response.setHeader("Content-Disposition","filename="+filename);
and it worked.

Similar Messages

  • How to set the filename when downloading a file?

    I'm working on mvc4. I have generated excel file dynamically using following simple code my hosting is on Azure
    I have created a Root path and then try to save that excel file.
    Problem is when my Action Result method response comes back it is giving default popup to open a file but file name is having a GUID instead my provided file name
    What id wrong any clue?
    Excel file generation code:
    Microsoft.Office.Interop.Excel.Application xlApp =
    new Microsoft.Office.Interop.Excel.Application();
    return tempPath;
    This method returns something like C:\AppData\Local\dftmp\Resources\11a2435c-998c-4fe8-aa55-8bb42455b4ca\directory\myexcelFILE.xls.
    The Download File popup does not give file name as myexcelFILE.xls it gives some GUID why so?
    Action
    Result method code
    public ActionResult DownloadExcel(){
    string path = ExcelGenerationCode(fileName);
    Stream s = new FileStream(path, FileMode.Open, FileAccess.Read);
    return new FileStreamResult(s, "application/vnd.ms-excel");
    Ashish Fugat (ashuthinksatgmail.com) SE

    http://forums.asp.net/
    The above forum has the MVC section.

  • When downloading a file, "open" option does not appears, only "save" does

    Before updating to 5.0, when downloading a file, I could select between "Open" and "save". Now I don't have the "Open" option. I need it because of my work and is a must have or it will take to much time to save and then opening them. In normal morning with "open" option took me like 30 minutes. Now it took me 1.5 hours and can't afford to loose that much time.

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe mode start window or otherwise make changes.
    *https://support.mozilla.org/kb/Safe+Mode
    A possible cause is that the server sends a wrong response header.
    The server may not comply to RFC 5987 and sends a wrong Content-Disposition:attachment; filename header.
    * https://developer.mozilla.org/en/Firefox_8_for_developers#Network

  • How do I set Safari to prompt me to choose a filename when downloading?

    I can't figure this out at all. How do I set Safari to give me a dialog box in which I can choose my own filename when downloadiing a file? Right now, as soon as I click "download linked file" it just puts the files straight on my desktop with whatever filename was assigned to it.
    This will help me identify files as I often download files saved with numerical names.

    Greeting Marco,
    This KBase article should help:
    http://docs.info.apple.com/article.html?artnum=301465

  • I am running 4.0.1 and when I download something the Download box stays blank-even though I have selected in General Preferences 'Show the downloads window when downloading a file' AND selected 'Save files to Downloads'....???

    I am running 4.0.1 and when I download something the Download box stays blank-even though I have selected in General Preferences 'Show the downloads window when downloading a file' AND selected 'Save files to Downloads'....???

    In Firefox Options / Privacy be sure "Remember download history" is checked. To see all of the options on that panel, "Firefox will" must be set to "Use custom settings for history".
    To find your OS information, on your Windows desktop, right-click the My Computer icon, choose Properties, under System on that small window is info about your OS.
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • TS1368 when downloading large files such as videos of television season do you need to turn off autolock to prevent download from halting

    when downloading large files such as videos of a television season do you need to turn off autolock to prevent download from halting? And if so, if the download will take a significant amount of time (not sure how much offhand) how do you prevent burn in from prolonged screen image?

    Among the alternatives not mentioned... Using a TiVo DVR, rather than the X1; a Roamio Plus or Pro would solve both the concern over the quality of the DVR, as well as providing the MoCA bridge capability the poster so desperately wanted the X1 DVR to provide. (Although the TiVo's support only MoCA 1.1.) Just get a third-party MoCA adapter for the distant location. Why the hang-up on having a device provided by Comcast? This seems especially ironic given the opinions expressed regarding payments over time to Comcast. If a MoCA 2.0 bridge was the requirement, they don't exist outside providers. So couldn't the poster have simply requested a replacement XB3 from the local office and configured it down to only providing MoCA bridging -- and perhaps as a wireless access point? Comcast would bill him the monthly rate for the extra device, but such is the state of MoCA 2.0. Much of the OP sounds like frustration over devices providing capabilities the poster *thinks* they should have.

  • How do i set drive to update changes only when same name files are added

    I Want to set up an external drive to update changes only when same name files are dragged from desktop can any one help?

    That's still a little ambiguous. What recording software are you using?
    Usually the individual sound files in a music project file are included in a separate folder. For example, GarageBand normally hides these files inside a single Project file in the Finder, but you can right-click and Show Package Contents to see the individual audio files.
    Any of those backup utilities I mentioned will be smart enough to copy the new and changed files within the project file. In the Terminal these .band files are actually directories, just like .app Applications in the Finder are actually directories. I think Finder may actually handle it properly also, but I'm not really sure what the Finder will do when you re-copy a GarageBand project folder to an existing backup copy and only some of the audio files have changed.

  • When downloading a file, how can I see the download speed ?

    When downloading a file, how can I see at what speed it is downloading a file ?

    Go to the
    '''''[https://addons.mozilla.org/en-US/firefox/ Mozilla Add-ons Web Page]'''''
    (There’s a lot of good stuff here).<BR>
    What you want is a program to show you what you want to see.
    I myself use
    '''''[https://addons.mozilla.org/en-US/firefox/addon/download-status-bar/?src=collection&collection_id=33bf10fa-666d-45a2-9bc9-491ce21671c6 Download Status Bar]'''''.

  • How can I turn off the Download pop up Window from displaying when downloading a file?

    How can I turn off the Download pop up Window from displaying when downloading a file?

    To not display the built-in Firefox downloads window, Tools > Options > General tab, un-check "Show the <u>D</u>ownloads window when downloading a file". See: http://support.mozilla.com/en-US/kb/Options+window+-+General+panel
    If you have some other download manager installed, you will need to see the documentation for the download manager.
    <br />
    You have installed plugins with known security issues that should be updated. To see the plugins submitted as part of your question post, click "More system details..." to the right of you original question.
    *Shockwave Flash 10.1 r53
    *Next Generation Java Plug-in 1.6.0_18 for Mozilla browsers
    #'''Check your plugin versions''': http://www.mozilla.com/en-US/plugincheck/
    #*'''Note: plugin check page does not have information on all plugin versions'''
    #'''Update Shockwave Flash'''
    #*Use Firefox to Download and SAVE to your hard drive from one of the links below; '''<u>the links take you directly to the download and you avoid the "getplus" download manager and "extras" (i.e., toolbars, virus scan links, etc.) on the main Adobe page.</u>'''
    #*SAVE to your Desktop so you can find it
    #*After download completes, close Firefox
    #*Click on the file you just downloaded and install
    #**Note: Vista and Win7 users may need to right-click the installer downloaded and choose "Run as Administrator"
    #**Note: Most browsers other than IE will also get updated with this one download
    #**Note: To update IE, same procedure '''<u>but use IE</u>''' to go: http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_ax.exe
    #*After installation, restart Firefox and check your version again.
    #*'''<u>Download links and other information</u>''':
    #** https://support.mozilla.com/en-US/kb/Managing+the+Flash+plugin#Updating_Flash
    #** '''<u>or</u>''' you can download, save, then run the manual installers for IE, then for Firefox (and all other browsers) from here: http://kb2.adobe.com/cps/191/tn_19166.html#main_ManualInstaller
    #* Also see: http://support.mozilla.com/en-US/kb/Installing+the+Flash+plugin
    #* Also see (if needed): http://kb2.adobe.com/cps/191/tn_19166.html#main_Uninstall
    #'''Update Java:'''
    #* Download and update instructions: https://support.mozilla.com/en-US/kb/Using+the+Java+plugin+with+Firefox
    #* Removing old versions (if needed): http://www.java.com/en/download/faq/remove_olderversions.xml
    #* Remove multiple Java Console extensions (if needed): http://kb.mozillazine.org/Java#Multiple_Java_Console_extensions
    #* After the installation, start Firefox and check your version again.

  • Firefox crashes when downloading huge files

    When downloading huge files like a 4GB DVD image of linux, firefox starts to build up memory usage. After downloading 3GB it takes around 4GB of memory and then crashes since it can't possibly grow any larger. WHY is it doing this? In earlier versions of firefox it created a .part file and stored all data in there. But right now it stores the WHOLE download in memory and then saves it directly to the file. No .part files on the drive.

    I installed an apache webserver for faster local downloading and put a 4GB DVD up.
    First try on Windows7: After 500MB of downloading it stops with a memory load of 1.6GB then it suddenly tells me the download is finished - at 500MB of 4GB. No crash this time but still not the desired result.
    Try on Windows Vista: After 1.5GB of downloading and 1.7GB of memory usage and then the CPU activity jumped to 100% on the core where Firefox executes. Took around 5min then CPU goes down to 2% and it tells me the download finished and starts a virus scan. No crash either. Downloaded only 1.6GB of 4GB
    Maybe it didn't crash this time because the download is too fast. Earlier while downloading from internet it always crashed while downloading debian DVD image. Later I used Internet Explorer to complete the download. I'll install a bandwidth control in my apache and try again over a longer period of time.

  • My C drive is 19.5 GB. xp sp3 took 5.05 GB.Firefox also installed here . There's no room for new downloaded files.So I changed the save to option in another drive. Still when downloading large files 'low disk space' message shown.

    suppose I want to download a 4 or 5 GB file,in C:/ there is usually 2 or 3 GB left.So I changed the directory of saved files to E:/.Still low space problem occurs and the newly downloaded file is not saved.A low disk space message is shown.Why is this showing?How to resolve this?

    in options under the "general" tab change the download folder,if that does not help change the option to "ask every time".I recommended to use DAP to download your files its great and accelerates your speed quite a lot.
    link: www.speedbit.com

  • Mac adds automatically a suffix when downloading a file. How to stop the Mac from doing this?

    I want to download a gps-file for my tomtom navigation system.
    These files have the suffix .itn
    When downloading, OS X transforms the file from filename.itn  to   filename.itn.txt automatically, therefore adds an ".txt", and opens the texteditor with the file.
    I just want OS X to leave the file as it ist and add or do nothing to or with it. Just put it in the download-folder.
    When hiding the suffix with apple-i, the file is no longer readable for the navi system. There ist no option to tell the mac just to do nothing; you just can select a different app. But this is not the solution.
    What can I do?
    Thanks
    Mathias

    Limnos wrote:
    I use a much older version of Safari when I do use it. I have that unchcked but when I download a file Safari just downloads it without any prompt for a file name.  What the OP needs is a way to change how Safari handles downloads so it either identifies them correctly and stops adding the wrong extenion to a file, or a way to edit the file name at download time. My old version doesn't have any apparent way to configure either of these, but I can do it in Firefox.
    What?
    The file has a name prior to downloading, Safari does not ask for one to be added at download time (neither do other browsers), once the file has been downloaded the extension can be corrected.

  • Xslt ecc6  ISO-8859-1 problem when download xml file

    Hello,
    i create an ABAP test program:
    *& Report Z_ABAP_TO_XML                                             *
    *& Write the data from an internal ABAP table into an XML document, *
    *& and write it onto your frontend computer                         *
    REPORT z_abap_to_xml.
    TYPE-POOLS: abap.
    CONSTANTS gs_file TYPE string VALUE 'C:\Users\Marco Consultant\Desktop\test.xml'.
    * This is the structure for the data to go into the XML file
    TYPES: BEGIN OF ts_person,
      cust_id(4)    TYPE n,
      firstname(20) TYPE c,
      lastname(20)  TYPE c,
    END OF ts_person.
    * Table for the XML content
    DATA: gt_itab        TYPE STANDARD TABLE OF char2048.
    * Table and work area for the data to fill the XML file with
    DATA: gt_person      TYPE STANDARD TABLE OF ts_person,
          gs_person      TYPE ts_person.
    * Source table that contains references
    * of the internal tables that go into the XML file
    DATA: gt_source_itab TYPE abap_trans_srcbind_tab,
          gs_source_wa   TYPE abap_trans_resbind.
    * For error handling
    DATA: gs_rif_ex      TYPE REF TO cx_root,
          gs_var_text    TYPE string.
    * Fill the internal table
    gs_person-cust_id   = '3'.
    gs_person-firstname = 'Bill'.
    gs_person-lastname  = 'Gates'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '4'.
    gs_person-firstname = 'Frodo'.
    gs_person-lastname  = 'Baggins'.
    APPEND gs_person TO gt_person.
    * Fill the source table with a reference to the data table.
    * Within the XSLT stylesheet, the data table can be accessed with
    * "IPERSON".
    GET REFERENCE OF gt_person INTO gs_source_wa-value.
    gs_source_wa-name = 'IPERSON'.
    APPEND gs_source_wa TO gt_source_itab.
    * Perform the XSLT stylesheet
    TRY.
        CALL TRANSFORMATION z_abap_to_xml
        SOURCE (gt_source_itab)
        RESULT XML gt_itab.
      CATCH cx_root INTO gs_rif_ex.
        gs_var_text = gs_rif_ex->get_text( ).
        gs_var_text = gs_rif_ex->get_text( ).
        MESSAGE gs_var_text TYPE 'E'.
    ENDTRY.
    * Download the XML file to your client
    CALL METHOD cl_gui_frontend_services=>gui_download
      EXPORTING
        filename                = gs_file
      CHANGING
        data_tab                = gt_itab
      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
        not_supported_by_gui    = 22
        error_no_gui            = 23
        OTHERS                  = 24.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    and i created XSLT test conversion:
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
      <xsl:output encoding="iso-8859-1" indent="yes" method="xml" version="1.0"/>
      <xsl:strip-space elements="*"/>
      <xsl:template match="/">
        <CUSTOMERS>
          <xsl:apply-templates select="//IPERSON/item"/>
        </CUSTOMERS>
      </xsl:template>
      <xsl:template match="IPERSON/item">
        <item>
          <customer_id>
            <xsl:value-of select="CUST_ID"/>
          </customer_id>
          <first_name>
            <xsl:value-of select="FIRSTNAME"/>
          </first_name>
          <last_name>
            <xsl:value-of select="LASTNAME"/>
          </last_name>
        </item>
      </xsl:template>
    </xsl:transform>
    Seem all correct infact the program download  a file XML but the file have the encoding="UTF-16" also if i have specified "iso-8859-1" and if i tried to opend the xml file the file appears not correct because is generated with as first character "#", why?
    Below the xml generated..
    What i have to do to generate a correct XML without errors?
    #<?xml version="1.0" encoding="utf-16"?>
    <CUSTOMERS>
      <item>
        <customer_id>0003</customer_id>
        <first_name>Bill</first_name>
        <last_name>Gates</last_name>
      </item>
      <item>
        <customer_id>0004</customer_id>
        <first_name>Frodo</first_name>
        <last_name>Baggins</last_name>
      </item>
    </CUSTOMERS>

    hello all!
    i resolve the problem using:
    * Perform the XSLT stylesheet
      g_ixml = cl_ixml=>create( ).
      g_stream_factory = g_ixml->CREATE_STREAM_FACTORY( ).
      g_encoding = g_ixml->create_encoding( character_set = 'utf-16' "unicode
        byte_order = 0 ).
      resstream = g_stream_factory->CREATE_OSTREAM_ITABLE( table = gt_xml_itab ).
      call method resstream->set_encoding
        exporting encoding = g_encoding.
    I think it's the right way, i put all my ABAP program updated:
    *& Report Z_ABAP_TO_XML                                             *
    *& Write the data from an internal ABAP table into an XML document, *
    *& and write it onto your frontend computer                         *
    REPORT z_abap_to_xml.
    TYPE-POOLS: abap.
    CONSTANTS gs_file TYPE string VALUE 'C:UsersMarco ConsultantDesktop     est.xml'.
    data:  g_ixml type ref to if_ixml.
    data:  g_stream_factory type ref to IF_IXML_STREAM_FACTORY.
    data:  resstream type ref to if_ixml_ostream.
    data:  g_encoding type ref to if_ixml_encoding.
    * This is the structure for the data to go into the XML file
    TYPES: BEGIN OF ts_person,
      cust_id(4)    TYPE n,
      firstname(20) TYPE c,
      lastname(20)  TYPE c,
    END OF ts_person.
    * Table for the XML content
    DATA: gt_xml_itab        TYPE STANDARD TABLE OF char2048.
    * Table and work area for the data to fill the XML file with
    DATA: gt_person      TYPE STANDARD TABLE OF ts_person,
          gs_person      TYPE ts_person.
    * Source table that contains references
    * of the internal tables that go into the XML file
    DATA: gt_source_itab TYPE abap_trans_srcbind_tab,
          gs_source_wa   TYPE abap_trans_resbind.
    * For error handling
    DATA: gs_rif_ex      TYPE REF TO cx_root,
          gs_var_text    TYPE string.
    * Fill the internal table
    gs_person-cust_id   = '3'.
    gs_person-firstname = 'Bill'.
    gs_person-lastname  = 'Gates'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '4'.
    gs_person-firstname = 'Frodo'.
    gs_person-lastname  = 'Baggins'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '5'.
    gs_person-firstname = 'Frodo'.
    gs_person-lastname  = 'Baggins'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '6'.
    gs_person-firstname = 'Frodo'.
    gs_person-lastname  = 'Baggins'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '7'.
    gs_person-firstname = 'Frodo'.
    gs_person-lastname  = 'Baggins'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '8'.
    gs_person-firstname = 'Frodo'.
    gs_person-lastname  = 'Baggins'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '9'.
    gs_person-firstname = 'Frodo'.
    gs_person-lastname  = 'Baggins'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '10'.
    gs_person-firstname = 'Frodo'.
    gs_person-lastname  = 'Baggins'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '11'.
    gs_person-firstname = 'Frodoèé'.
    gs_person-lastname  = 'Baggins~¦Üu0192'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '11'.
    gs_person-firstname = 'Frodoèé'.
    gs_person-lastname  = 'Baggins~¦Üu0192'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '11'.
    gs_person-firstname = 'Frodoèé'.
    gs_person-lastname  = 'Baggins~¦Üu0192'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '11'.
    gs_person-firstname = 'Frodoèé'.
    gs_person-lastname  = 'Baggins~¦Üu0192'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '11'.
    gs_person-firstname = 'Frodoèé'.
    gs_person-lastname  = 'Baggins~¦Üu0192'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '11'.
    gs_person-firstname = 'Frodoèé'.
    gs_person-lastname  = 'Baggins~¦Üu0192'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '11'.
    gs_person-firstname = 'Frodoèé'.
    gs_person-lastname  = 'Baggins~¦Üu0192'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '11'.
    gs_person-firstname = 'Frodoèé'.
    gs_person-lastname  = 'Baggins~¦Üu0192'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '11'.
    gs_person-firstname = 'Frodoèé'.
    gs_person-lastname  = 'Baggins~¦Üu0192'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '11'.
    gs_person-firstname = 'Frodoèé'.
    gs_person-lastname  = 'Baggins~¦Üu0192'.
    APPEND gs_person TO gt_person.
    gs_person-cust_id   = '88'.
    gs_person-firstname = 'Frodoèé'.
    gs_person-lastname  = 'Baggins~¦Üu0192'.
    APPEND gs_person TO gt_person.
    * Fill the source table with a reference to the data table.
    * Within the XSLT stylesheet, the data table can be accessed with
    * "IPERSON".
    GET REFERENCE OF gt_person INTO gs_source_wa-value.
    gs_source_wa-name = 'IPERSON'.
    APPEND gs_source_wa TO gt_source_itab.
    * Perform the XSLT stylesheet
      g_ixml = cl_ixml=>create( ).
      g_stream_factory = g_ixml->CREATE_STREAM_FACTORY( ).
      g_encoding = g_ixml->create_encoding( character_set = 'utf-16' "unicode
        byte_order = 0 ).
      resstream = g_stream_factory->CREATE_OSTREAM_ITABLE( table = gt_xml_itab ).
      call method resstream->set_encoding
        exporting encoding = g_encoding.
    TRY.
        CALL TRANSFORMATION z_abap_to_xml
        SOURCE (gt_source_itab)
        RESULT XML gt_xml_itab.
      CATCH cx_root INTO gs_rif_ex.
        gs_var_text = gs_rif_ex->get_text( ).
        gs_var_text = gs_rif_ex->get_text( ).
        MESSAGE gs_var_text TYPE 'E'.
    ENDTRY.
    * Download the XML file to your client
    CALL METHOD cl_gui_frontend_services=>gui_download
      EXPORTING
        filename                = gs_file
        FILETYPE                  = 'BIN'
      CHANGING
        data_tab                = gt_xml_itab
      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
        not_supported_by_gui    = 22
        error_no_gui            = 23
        OTHERS                  = 24.
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
      WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    *-- we don't need the stream any more, so let's close it...
    CALL METHOD resstream->CLOSE( ).
    CLEAR resstream.

  • Display save as dialog when downloading a file

    Hi,
    I want to display a save as dialog when the user downloads a file.
    Now I get a dialog where the user can choose to open or save it.
    I set these headers:
    res.setHeader("Content-disposition", "attachment; filename=" + filnamn);
    res.addHeader("Content-Type", "application/force-download");Thanks!

    Sorry!
    When the user downloads a file I want to open a dialog where the user
    can write a filename and then click Save to save the file.
    Today I get a dialog where the user first have to choose if he wants to open or save the file.
    When he clicks save then the dialog appears that I would want to be displayed.
    I hope this clearifies my question.

  • Error message when downloading a file in Firefox 3.0.1

    Hello everyone, hope you can help. I'm thinking maybe this is a permissions issue?
    When I try to download a file in Firefox 3 I get the following error message:
    "/Users/xxxx/Desktop/iPhoto_714.dmg could not be opened, because an unknown error occurred.
    Try saving to disk first and then opening the file."
    Any ideas? Thanks for your help.
    Bruce

    I wonder if my question somewhat relates to the others here... I recently upgraded from Office 2004 to Office 2007. When i removed 2004, Firefox was still associating any .doc or .docx file with 2004. So, i get the following message when i try to download files:
    document.docx could not be opened, because the associated helper application does not exist. Change the association in your preferences.
    Same thing with Adobe Acrobat - it's opening version 8, which i don't have a license for and i want it to open with version 7.
    I've tried several things, but have not come up with a solution. Can anyone help?

Maybe you are looking for

  • My iPhone 5s Siri and voice txt not working

    several weeks ago I notice that Siri wasnt working nor was my voice to txt. I attributed this to not updating my iOS because my cloud storage was full. The holidays were crazy, waited until I had time to transfer my pictures to my computer, so I coul

  • How do I know when a file loaded into a Sound object is invalid?

    I'm writing an app that allows the user to play various sound files. Some of these files are mp3, but some may also be ogg, wma, etc.  The selection is out of my control, so I need the sound API to tell me if it can't play something. To test, I loade

  • Calculations across multiple columns

    I am a virgin to iOS Numbers on the iPad and need to prove it's worth in work. I have a spreadsheet where I have to calculate the number of entries matching 3 criteria in a row: by Date (Month),type of job (e.g. bathroom or kitchen) and against a sco

  • LAYOUT CHANGE IN FBL1N

    HI EXPERTS ! The transaction code for the report we generate is FBL1N - vendor ledger. we require the vendor's bank detail in this report at the header i.e. vendor bank name , account no..(change layout of report for output ) this detail can be seen

  • HELP!!! Hidden folder in MyComputer: iPod_Control

    When I connect my ipod to MY computer there is a "hidden" folder calles iPod_control where i can enter and find all my music. The songs etc. are randomly divided in 49 folders. However, this hidden folder only appears when it is connected to MY OWN c