Wpg_docload not producing a file save dialog box

Hi Everyone,
I have a BLOB column in a database table and I want to show a link on a web page so when user click on it, it pops up a file download dialog box giving the user option to either open or "save as".
I am using wpg_docload.download file but it seems to be load the blob data into the browser (inline)
Here is the code:
   -- get image size
    intimgsize := dbms_lob.getlength(page_b_contents);
    -- print the header   
    owa_util.mime_header('Content-Type:application/vnd.ms-word;charset=utf-8', false);
    htp.p('Content-length: ' || intimgsize);
    htp.p('Content-Disposition:attachment filename="test.doc"');
    owa_util.http_header_close;
    -- download BLOB
    wpg_docload.download_file(page_b_contents);
Any thoughts what might be wrong?
Thanks

How must wpg_docload.download_file hack across the network, and into the client o/s process executable running the browser, and then force that browser process to pop up a dialog box to save contents as a file?
Do you understand the concept behind Mime types? The browser has specific actions (some configurable) for specific Mime types. PL/SQL can specify the Mime type. And provide a well formatted Mime header. It cannot however force the browser to act in a specific way when it receives that Mime stream from PL/SQL.
See Office 2007 File Format MIME Types for HTTP Content Streaming - VSOfficeDeveloper: Known Problems, Bugs, and Fixes - Si… for basic header details.

Similar Messages

  • File Save dialog box not showing correct file name while saving file

    hi
    Currently, after the Submit button is hit, the File Save dialog box is displayed. If the user saves the file and then opens it then the output appears correct however if the user chooses to open the file without saving on the local machine then the correct viewer is not used to display the file. The name of the file is defaulted as qotSCopPrint.jsp and the default file viewer for jsp files is chosen to view the file. The format of the file is obviously not text (it is either pdf or rtf) so the output shows binary characters.

    data : v_repid like sy-repid.
    parameters : p_file like rlgrap-filename.
    initialization.
    v_repid = sy-repid.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'F4_FILENAME'
           EXPORTING
                program_name  = v_repid
                dynpro_number = syst-dynnr
                field_name    = 'P_FILE'
           IMPORTING
                file_name     = p_file.
    Message was edited by:
            Chandrasekhar Jagarlamudi

  • Oracle BPM 10.3 File Save Dialog Box

    Hi,
    I am using Oracle BPM 10.3. Can anybody tell me that how to get a File Save Dialog box in the method. On the method call i want to call Save Dialog box which will save the file on the local computer.
    Thanks
    Edited by: user9293762 on Sep 2, 2010 9:35 AM

    The compilation within Studio works with a bit smaller (like 35MBytes) project, thus I think the problem is some sort of memory handling.
    The problem comes up while it is trying to compie/load 'external resources': it still works with 512M or even 256M of heap before this operation.
    Some weird thing is that I cannot set Xmx >640M, nor launcher.XXMaxPermSize > 1024M (winXP SP2, 2G RAM). While I'm sure that nothing is hacked around the memory allowance of Windows (i.e. how much memory does it allow for particular executables), I think this operation should be tested to work even on 256M heap...
    On the other hand, the ANT compilation works well.
    Well, almost well.
    I have had some errors in my project, which ALBPM6.0 said to be OK, like defining a String array attribute 'not null' and setting no default value; or defining some object to be abstract and instantiating it.
    However these errors are not always reported, e.g. during catalog compilation: XY must be explicitly instantiated before being used since it does not have a default initialization... thus made it static (however, it has been used as static all the time).
    I had to hack CatalogPublisher a bit so that I can read them on stdout, and correct those syntax errors.
    For this possibility, iterate over the non-empty foCheckerListener.getPresentationErr() in CatalogPublisher after checkXO().

  • How to get a file save dialog box on button click

    Hi All,
    I have  some text  and I want to write this text in to a  file.Then I want to save this file to my local system using a file save dialog box so that I can choose the location where I want to save this file.Please tell me how can I do this in WebDynpro.
    If I cannot get the File save Dialog Box then how can I give the path while creating the new file so that it is created on my local system  as the application is running on server.
    Regards
    Rahul

    Hi Rahul,
    Sometime back I was also facing the same requirment and there are only two solutions to it one is what Armin suggested to use the file download UI element the other one you can get from this link How to write a file on our local machine using Web Dynpro
    Regards
    Sid

  • File Save Dialog Box Option

    Hi Experts,
      Is there any Function Module or options available to save the contents of one Internal Table , by Browsing the Windows drive & Giving the File name.
    FILENAME = "C:\TEST.TXT
      CALL FUNCTION 'WS_DOWNLOAD'
             EXPORTING
                  FILENAME = FILENAME
                  FILETYPE = 'DAT'
             TABLES
                  DATA_TAB = FINALITAB.
    Instead of Hardcoding the Path (c:\test.txt) , i need to choose the drive & give the file name..
    Urgent!!!Help me.....
    Thanks in advance..

    data : v_repid like sy-repid.
    parameters : p_file like rlgrap-filename.
    initialization.
    v_repid = sy-repid.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'F4_FILENAME'
           EXPORTING
                program_name  = v_repid
                dynpro_number = syst-dynnr
                field_name    = 'P_FILE'
           IMPORTING
                file_name     = p_file.
    Message was edited by:
            Chandrasekhar Jagarlamudi

  • Download file in struts - File save dialog not showing up

    Hi,
    The issue i have is - the file save dialog box which should be displayed on file download is not showing up.
    I have a DAO being called from the Action form SaveDocumentAction which extends DispatchAction and has a download(mapping, request, response,..) method. Below are relevant portions of my code.
    public void showDocument(DocumentTO Doc, HttpServletResponse response){
    //get filename etc
    response.setContentType("application/x-download");
    response.setHeader("Content-Disposition", "attachment; filename=myFile.txt");
    OutputStream out = response.getOutputStream();
    //code for writing from input file to out
    I shld be getting a File Save dialog after response.setHeader(), but I am not. Can anyone tell me where I am going wrong. I have printed SOPs and all print fine, even the file writing part.

    Put this code into a servlet rather than a JSP.
    JSP are for returning text based HTML pages. It adds extra carriage returns into the response that will corrupt the file, and prevent the dialog showing up.
    This code is much better off being in a servlet
    If you are using a FileInputStream, you should be using a ServletOutputStream rather than the JSP writer: response.getOutputStream()
    When dealing with file input in a JSP/Servlet you should use the methods of ServletContext. getRealPath() turns a website relative file into a real location on disk. getResourceAsStream() opens the file for you. getResourceAsStream() is more reliable as it will work even if the web app is deployed in a packed WAR.
    Cheers,
    evnafets

  • Windows File Save dialog freezes a virtual folder

    We have a shell namespace  extension that presents a remote document repository as a virtual  folder in the Desktop folder. When the File Save dialog box is opened from  within Adobe Reader or  Acrobat version 9, our  virtual folder appears inactivated. Even though the common dialog box displays  the items in the folder, it is not possible to select any of the items, e.g.,  using a mouse click or key code press.
    Note that the same common  dialog when running in open mode works fine. Our virtual folder is enabled, and  an item can be selected for the Open action. It appears that the problem shows  up only when the Save dialog runs from within Adobe Reader 9 or Acrobat  9.
    The problem appears to be  limited to Windows 7 and Vista. XP does not have the  problem.
    I would like to know  why and how the save dialog gets disabled, and would like to know how  to prevent the dialog from disabling the  virtual folder. 

    Hi,
    I have followed the example you mentioned to save a picture to the folder shortcut, and the name won't change to the shortcut. Also the picture would be saved into the original folder.
    Here is the steps I did:
    1. Create a folder named New folder in My documents:
    2. Select it and then press ctrl + C and right-click on destop choose paste shortcut(named New folder-Shortcut);
    3. Right-click on a picture in one webpage then open the save picture as dialog box;
    4. Navigate to the desktop folder shortcut and double-click into it, the file name field won't change;
    5. My machine is Windows 7 Enterprise SP1.
    Would you please tell some more details on how you saved the picture?
    In addition, there might be some other applications triggered this action, we may take a look with process monitor:
    The download link here:
    Process monitor
    And here is a blog talking about how to use it:
    Process Monitor - Hands-On Labs and Examples
    If possible, please redo the action, then upload the result into onedrive and paste the link here.
    Best regards
    Michael Shao
    TechNet Community Support

  • Prevent File Save Dialog appearing?

    I have been using Excel 2010 to create Word Documents and then use .SaveAs to save the newly created file without any issues
    When I moved to Office 2013 the same code now presents a File Save dialog box.
    I have researched the issue and can find no way to prevent the Dialog appearing (and worse regardless of the user selection the Excel code crashes)
    The following is a simplified version of the troublesome code
    Sub TestWordSaveAs2()
    Dim InvoiceProFormaFileName As Variant
    Dim NewFileName As String
    Dim WordApplication As Object
    Dim WordDoc As Object
      ' Prompt for a word document
      InvoiceProFormaFileName = Application.GetOpenFilename(FileFilter:="Word Documents, *.docx", Title:="Any Word File", MultiSelect:=False)
      Set WordApplication = CreateObject("Word.Application")
      Set WordDoc = WordApplication.Documents.Open(InvoiceProFormaFileName) ' Open the pro-forma invoice
      ' Create a new name
      NewFileName = Replace(InvoiceProFormaFileName, ".docx", "2.docx")
      WordDoc.SaveAs2 Filename:=NewFileName, FileFormat:=16, AddtoRecentFiles:=False ' <======= this line Shows the File Save Dialog and then fails
      WordDoc.Close SaveChanges:=0 ' wdDoNotSaveChanges
      ' Finished with the Word Application so can close
      WordApplication.Quit
    End Sub
    Thank you in advance

    Hi,
    I have create a doc file and a excel file in my pc, after I run the code you have provided ,and choose the doc file I just created, it runs without any save dialog. And My Office is Pro Plus 2013 .
    I have upload my sample to OneDrive, you can download it here:
    http://1drv.ms/1DhnMe5
    When you run this sample, will this show the save dialog again ?
    To narrow down this issue, can you create a new empty word and choose it in the excel, does it will happen again? if it is convenient, can you share the doc file you're using? Have you update your office ?
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Clicking a .pdf link does not open .pdf file, it opens a SAVE DIALOG box

    Recently when I click on a .pdf file link I am no longer able to open the file in a adobe reader either within a FIREFOX webpage or open it using the full adobe program. Instead it opens a SAVE dialog box requesting me to save to my harddrive. I am not sure what has happened and am trying to find someone who might know what is going on?

    You can change the action for Portable Document Format (PDF) from Preview in Firefox to use the Adobe Reader or set to Always Ask in "Firefox > Options/Preferences > Applications".
    You can set the pdfjs.disabled pref to true on the <b>about:config</b> page to disable the build-in PDF viewer.
    You can check the value of the plugin.disable_full_page_plugin_for_types pref on the about:config page and remove the application/pdf part if present or reset the pref to the default via the right-click context menu.
    *http://kb.mozillazine.org/about:config
    See also:
    *https://support.mozilla.org/kb/view-pdf-files-firefox-without-downloading-them

  • Save PDF File As dialog box not appearing

    I am running Acrobat 8 Pro on Windows Server 2008. I'm having a problem with the Adobe PDF printer. When I attempt to print a document to this printer, the "Save PDF File As" dialog box does not appear. The dialog box does open, but it is either hidden behind the running application or is minimized. I have to click the icon on the taskbar to bring the window to focus. This problem only occurs the first time I attempt to print after logging onto the computer. On subsequent print jobs the dialog box shows up fine.

    Is there a registry setting or anything that I can set to get rid of the 'Save Scanned File As' box.
    No.

  • To download file but still the Save Dialog box still not show? Please help.

    Hi All,
    Below is my full code to download file but still the Save Dialog box still not show..
    <%@ taglib prefix="cs" uri="futuretense_cs/ftcs1_0.tld"
    %><%@ taglib prefix="asset" uri="futuretense_cs/asset.tld"
    %><%@ taglib prefix="assetset" uri="futuretense_cs/assetset.tld"
    %><%@ taglib prefix="commercecontext" uri="futuretense_cs/commercecontext.tld"
    %><%@ taglib prefix="ics" uri="futuretense_cs/ics.tld"
    %><%@ taglib prefix="listobject" uri="futuretense_cs/listobject.tld"
    %><%@ taglib prefix="render" uri="futuretense_cs/render.tld"
    %><%@ taglib prefix="siteplan" uri="futuretense_cs/siteplan.tld"
    %><%@ taglib prefix="searchstate" uri="futuretense_cs/searchstate.tld"
    %><%@ taglib prefix="locale" uri="futuretense_cs/locale1.tld"
    %><%@ taglib prefix="dateformat" uri="futuretense_cs/dateformat.tld"
    %><%@ taglib prefix="blobservice" uri="futuretense_cs/blobservice.tld"
    %><%@ taglib prefix="satellite" uri="futuretense_cs/satellite.tld"     
    %><%@ taglib prefix="date" uri="futuretense_cs/date.tld"
    %><%@ page import="COM.FutureTense.Interfaces.*,
    COM.FutureTense.Util.ftMessage,
    COM.FutureTense.Util.ftErrors"
    %><%@ page import="COM.FutureTense.Interfaces.*,
    COM.FutureTense.Util.ftMessage,
    COM.FutureTense.Util.ftErrors"
    %>
    <%@ page language="java" contentType="text/html;charset=UTF-8" %>
    <%@ page import="java.io.File" %>
    <%@ page import="java.io.OutputStream" %>
    <%@ page import="java.io.FileInputStream" %>
    <cs:ftcs><%-- france/test_template
    INPUT
    OUTPUT
    --%>
    <%-- Record dependencies for the Template --%>
    <ics:if condition='<%=ics.GetVar("tid")!=null%>'><ics:then><render:logdep cid='<%=ics.GetVar("tid")%>' c="Template"/></ics:then></ics:if>
    <%
    String fileToFind = request.getParameter("file");
    if(fileToFind == null) return;
    File fname = new File(fileToFind);
    System.out.println("Save As: "+fname.getName() );
    if(!fname.exists()) return;
    FileInputStream istr = null;
    response.setContentType("application/octet-stream;charset=ISO-8859-1");
    response.setHeader("Content-Disposition", "attachment; filename=\"" + fname.getName() + "\";");
    try {
    istr = new FileInputStream(fname);
    int curByte=-1;
    while( (curByte=istr.read()) !=-1){
    out.write(curByte);
    out.flush();
    } catch(Exception ex){
    ex.printStackTrace(System.out);
    } finally{
    try {
    if(istr!=null) istr.close();
    } catch(Exception ex){
    System.out.println("Major Error Releasing Streams: "+ex.toString());
    try {
    response.flushBuffer();
    } catch(Exception ex){
    System.out.println("Error flushing the Response: "+ex.toString());
    %>
    </cs:ftcs>
    Can anybody help me with this??? What is lacking...
    Thank you in advance.

    Put this code into a servlet rather than a JSP.
    JSP are for returning text based HTML pages. It adds extra carriage returns into the response that will corrupt the file, and prevent the dialog showing up.
    This code is much better off being in a servlet
    If you are using a FileInputStream, you should be using a ServletOutputStream rather than the JSP writer: response.getOutputStream()
    When dealing with file input in a JSP/Servlet you should use the methods of ServletContext. getRealPath() turns a website relative file into a real location on disk. getResourceAsStream() opens the file for you. getResourceAsStream() is more reliable as it will work even if the web app is deployed in a packed WAR.
    Cheers,
    evnafets

  • MS Word: This file is read-only. To save a copy, click OK, and give the document a new name in the save dialog box.

    This is not a question. I believe I've found a new issue and the fix for it.
    The situation:
    A brand new iMac 27" running Yosemite 10.10.1
    MacMini server running 10.8.5 server.
    The issue:
    Client on iMac trying to work on MS Word documents stored on server was requiring him to save the documents to his desktop and then copy them back to the folder on the server. The exact error message was, "This file is read-only. To save a copy, click OK, and give the document a new name in the save dialog box."
    The issue is unique to this computer in an office of 10 client computers and three servers.
    Attempted fixes:
    Verified that the ".Temporaryitems" folder existed and the permissions were set properly.
    Repaired permissions on the client and the network share.
    Definitive fix:
    By default, Yosemite 10.10.1 uses SMB for connecting file shares. When I overrode the default and switched to AFP protocol, the issue went away.
    I hope this helps someone else.
    Rob

    That was it. What an operating system. It is very helpful to view files you are looking for. But if you have preview on you cannot save files.

  • Adobe pdf printer save dialog box opens in the background - progress bar shows Not Responding

    I have two users who have Acrobat X Pro version 10.1.4 that are experiencing the same things.  First, one person just changed laptops and the new one has a fresh Windows 7 Enterprise X64 image and new installation of Adobe Acrobat X Pro.  When he used the pdf printer for the first time(after opening the program and accepting the license agreement) he was in MS Excel '07 and chose file>print>Adobe PDF and then the progress bar came up and then showed not responding.  After he did this a couple of times with me standing there I noticed that the save dialog box was opening in the background because I could see the icon blinking on the taskbar.  He said that his old computer never did this and that it would always open up and ask where to save the file and never show 'not responding' on the progress bar.  The other person having the same issue is running the same version but she has had the program installed on her machine for a few months and an older version on before that. 
    Is there a way to make the dialog box show as soon as you print to the Adobe PDF printer?  What is causing this?  Is there another way to create a pdf from MS Office like the add-on? 

    I have two users who have Acrobat X Pro version 10.1.4 that are experiencing the same things.  First, one person just changed laptops and the new one has a fresh Windows 7 Enterprise X64 image and new installation of Adobe Acrobat X Pro.  When he used the pdf printer for the first time(after opening the program and accepting the license agreement) he was in MS Excel '07 and chose file>print>Adobe PDF and then the progress bar came up and then showed not responding.  After he did this a couple of times with me standing there I noticed that the save dialog box was opening in the background because I could see the icon blinking on the taskbar.  He said that his old computer never did this and that it would always open up and ask where to save the file and never show 'not responding' on the progress bar.  The other person having the same issue is running the same version but she has had the program installed on her machine for a few months and an older version on before that. 
    Is there a way to make the dialog box show as soon as you print to the Adobe PDF printer?  What is causing this?  Is there another way to create a pdf from MS Office like the add-on? 

  • 'Save Scanned File As' dialog box causing problems

    A lot of our users just upgraded to Adobe Std 8 from Adobe Std 7. With Adobe Std 8, the 'Save Scanned File As' dialog box comes up even before the document gets scanned (this was not the case with Adobe Std 7). How do you get rid of the dialog box? This is causing us a lot of problems because our Adobe is integrated with a document management program called DM5. With Adobe Standard 8 our users cannot save directly to DM5.Because the
    #Save Scanned File As# dialog box comes up first, now they have to tell Adobe to save it first somewhere other than DM, after the document
    gets scanned they save the document again to DM then they go back and delete the document that they saved in the other location. Is there a registry setting or anything that I can set to get rid of the 'Save Scanned File As' box. If you hit CANCEL, the document does not get scanned so users really do not have a choice but to save the document twice. As I said earlier, this was not the case with Adobe Std 7.

    Is there a registry setting or anything that I can set to get rid of the 'Save Scanned File As' box.
    No.

  • Save dialog box for text and pdf files

    Hi,
    I am using CRM UI framework for developing my components.
    Currently i have a hyperlink for a file. On click of the hyperlink i want the Save dialog box to appear with SAVE/OPEN/CANCEL options. For Word/Excel/PPT files, dialog box appears. However for txt/PDF files, dialog box does not appear.
    URL looks like the following:
    http://uxcia0g.wdf.sap.corp:50026/sap/bc/contentserver/000?get&pVersion=0045&contRep=RPS_DB_02&docId=80215A5C348E1DEE8A9EC8FFDED05E54&compId=chk.pdf&content_disposition=attachment.
    Could you please help me to resolve this issue?
    Regards,
    Vinay

    First of all, you need an app on the iPad that can read those files that you want to transfer. Adobe Reader and iBooks are two free apps that will read PDF files. Adobe Reader is much more robust than iBooks as it offers so many more features like renaming files, creating folders, annotating, highlights, etc.
    Download Adobe Reader in the App Store. Then read this about file sharing with iTunes.
    iOS: About File Sharing - Support - Apple
    There are other ways to get files to the iPad, like email, DropBox and some other apps that let you mount your iPad like a flash drive.
    This should be helpful as well.
    iTunes 11 for Mac: Set up syncing for iPod, iPhone, or iPad

Maybe you are looking for

  • Problem connecting multiple ios devices in a session using GKSession

    Hi everyone, Here's my problem. I am a beginner in iOS apps development and I am developing an application that requires to connect from 3 to 6 devices together using Bluetooth. I am not using GKPeerPickerController since it does not allow me to defi

  • I have a query concerning the Creation of Businees Partner

    Hi Group, I tried to create a Business Partner using the Function  Module "BAPI_BUPA_FS_CREATE_FROM_DATA" and I got the return value of the Business Partner also. And this FM I was using to create BP for the Organization. But the thing is that, I got

  • My Adobe Flash Player won't install. ( At all )

    So when I try to install Adobe Flash Player, everytime, on every user on my computer, it always pops up when i launch it, but nothing happens. It is just a boring gray screen. I need Flash Player to play like all the games in the world ( exaggeration

  • Selecting Tabs and Arrow Key Tab Switching

    Older versions of Firefox had this feature. Pre 3.0, Firefox let you select the text around a tab by middle clicking, which allowed you to scroll through tabs using the arrow keys. After 3.0, you could do this by left clicking and then immediately ri

  • Publish to Flickr in LR4

    When I try to publish to Flickr from LR4 after about an hour I get error saying file to large.  Only published about 17 out of 600 images. If I try to restart fails quickly.  How do I publish all of these to Flickr.