Forcing attachments to download from content outside portal framework

We are having an issue with binary content which resides outside portal framework in a separate system being downloaded by users. Whenever a page flow action is submitted and the binary data(xls, pdf, doc files etc) is returned by the system(documentum in this case) and we try to get the download option it shows data as garbage on the jsp but does not prompt to download the file. Here is the code for 2 options tried
Option 1 - Trying to write binary content from Page Flow
Code in Page Flow
byte[] binaryData = document.getBinaryDocument(); //'document' is the data object here
HttpServletResponse response = getResponse();
response.setContentType("application/ms-excel");
response.setContentLength(binaryData.length);
response.setHeader("Content-disposition", "attachment; filename=\"" + document.getFileName() + ".xls\"");    //document does not return file extension
response.getOutputStream().write(binaryData);Option 2 - Trying to write binary content from Servlet Context outside portal framework
Code in Page Flow
getRequest().setAttribute("binarydoc", document); Code in JSP
com.jeni.DocumentumData doc = (com.jeni.DocumentumData)request.getAttribute("binarydoc");
byte[] binaryData = doc.getBinaryDocument();
response.setContentType("application/ms-excel");
response.setContentLength(binaryData.length);
response.setHeader("Content-disposition", "attachment; filename=\"" + doc.getFileName() + ".xls\""); //document does not return file extension
response.getOutputStream().write(binaryData);
response.getOutputStream().flush();Both options produce garbage on the jsp page.
Please respond soon
Thanks

Yes. It did not work here's the changed code in the JSP page in Option 2 that produced the same result.
com.jeni.DocumentumData doc = (com.jeni.DocumentumData)request.getAttribute("binarydoc");
byte[] binaryData = doc.getBinaryDocument();
response.reset();
response.setContentType("application/ms-excel");
response.setContentLength(binaryData.length);
response.setHeader("Content-disposition", "attachment; filename=\"" + doc.getFileName() + ".xls\""); //document does not return file extension
response.getOutputStream().write(binaryData);
response.getOutputStream().flush();
response.flushBuffer();

Similar Messages

  • Failed to import publish settings file in Azure Toolkit for Eclipse with Java downloaded from Azure Management Portal

    I tried to deploy the Hello World JSP application to Azure from Eclipse following the instructions at http://msdn.microsoft.com/library/azure/hh690944%28VS.103%29.aspx. Got the following error when trying to import Publish Settings file downloaded from Azure
    Management portal:
    Importing MyMSDN.publishsettings file failed. Reason: failed to parse file. Ensure publish settings version is 1.0.
    Could someone help me solve this problem? Thanks.

    Hi huihuang,
    It seems there is some issue with your publishsettings file, could you open this file and copy the content here? Or please have a look at this article:
    http://gauravmantri.com/2012/09/14/about-windows-azure-publish-settings-file-and-how-to-create-your-own-publish-settings-file/ for more information about it.
    Best Regards,
    Jambor
    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.

  • Can't activate Office 2011 for mac (downloaded from office 365 portal)

    Hello All,
    I've installed Office 2011 for mac which was downloaded from office 365 Portal. However, during installation process there was not a windows for activation (key or sign in method).
    Is there a way to force activation on Office 2011 for mac?
    Note: I've deleted office 365 com.microsoft.office.plist but i didn't get a windows for activation.
    MacbookPro Version 10.10.2
    Regards
    JO

    Hi,
    If you downloaded Office 2011 for Mac, you may not need a product key to activate it. Office 365 uses a new mechanism that the activation is based on your Office 365 Account instead of a product key.
    Anyway, in this forum we mainly discuss questions and feedbacks about Office for Windows, as your question is about Office for Mac, I suggest you post the question in Office for Mac forum:
    http://answers.microsoft.com/en-us/mac
    I've also noticed this question is actually more related to the activation, you may need to contact the local customer service to get more dedicated assistance:
    https://support.microsoft.com/gp/customer-service-phone-numbers/en-us?wa=wsignin1.0
    Regards,
    Melon Chen
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please click
    here

  • Attachments dont download from Gmail in Safari, They disappear,I even tried re-downloading Safari and that download disappeared, it is not in my downloads folder, I actually searched in finder for the file and it is nowhere on my computer.  Please help!

    Attachments dont download from Gmail in Safari, They disappear,I even tried re-downloading Safari and that download disappeared, it is not in my downloads folder, I actually searched in finder for the file and it is nowhere on my computer.  Please help!

    Oh my gosh I had the EXACT same problem, and for ages I couldn't figure out how to fix it until today. Here's what I did:
    First I went onto my computer, opened itunes, and un-installed tumblr, vine and kik. These were the apps I was having problems with (it said I had them on my phone but, like you, they didn't show).
    Then I went to the itunes store, searched for each one, and it said I could update them so I did (just FYI: for tumblr a window popped up saying "please click ok to confirm you are 17 years or older", so I did that also)
    When I went back to my phone and tried installing them again (still on my computer), it worked!
    I hope this helps, because it was incredibly frustrating. Good luck!

  • Under what category is the CML download from the support portal?

    I am unable to locate the CML downloads from the cisco support portal.  What category is this located in?
    It seems like the marketing teams need to have a meeting and decide what kind of product this is.  Here in the support forums the product is listed under Network Infrastructure.  On the cisco.com site it is listed under Cloud and Systems Management.
    I have a valid license and support contract incoming, I just can't find the media download location.  Thanks for any help.

    I was able to work with TAC to get the edelivery email that included the OVA file.  How are you all going to handle product updates if there isn't any way to download the software from the normal support download tool?
    Another question I have now that I have the environment running is where do I download the client software?  I expected to see a download link somewhere on the User Workspace Management portal, but don't see anything.
    So far I have been a little disappointed with the lack of clarity in the documentation on simple things like this.  The documentation does a good job of instructing how to modify the .vmx file to get the nested hypervisor working (something that the end user shouldn't have to do, this should be handled in the OVA before it is delivered to the end user).
    I also feel that there needs to be a little more discussion on the deployment options for this software.  We are initially just wanting to run the simulations sandboxed with no connectivity to our corporate network except through the management interface for user connections.  I don't think we need the FLAT and SNAT networks for this, but if we do, I am confused because the documentation is poor.
    So now I have a server deployed, but no way to actually run simulations since I don't have any client software.

  • How do I force a file download from a folder above the root?

    I am new to ColdFusion and need some help. I set up a virtual folder on my website and then mapped in the CF9 admin panel to a "Docs" folder above my root, where I would like to store sensitive documents. CF tags are enabled.
    I know that my mapping is set up correctly, because when I set up a cfm page with the following code, I can successfully download the file:
    <cfheader name="Content-Disposition" value="attachment; filename=Calendar.pdf">
    <cfcontent type="application/pdf file=/Docs/Calendar.pdf">
    But what I need is to create one cfm age that will be able to handle downloads of multiple files types and names from the folder above my root.
    I then found Duke Snyder's solution on an older forum for the "click link and download file" question where he suggests making a "download.cfm" page with the following code:  I did this, and named the file "download.cfm"
    <cfsetting enablecfoutputonly="yes">
    <cfheader name="Content-disposition" value="attachment; filename=""#Url.FileName#""">
    <cfcontent type = "foo/bar" file = "/Docs/#Url.FileName#">
    Then Duke suggests: "Now I pass the FileName through the Url and it WILL ask if you want to open or download the file. We accomplish this by making up an eronious file type."
    I then set up a password-protected page on the site that lists the titles of a number of documents, with links to the virtual folder, where they can be downloaded.  One of the links, which goes to "Calendar.pdf" I constructed as: "download.cfm?FileName=Calendar.pdf"  When I click on the link, I get the popup box that says "Do you want to open or save this file?  With the name listed as: "download.cfm?Filename=Calendar_pdf"
    When I click "Save", I get the message: "Internet Explorer cannot download download.cfm from www.... Internet Explorer was not able to open this Internet site.  The requested site is either unavailable or cannot be found. Please try again later.
    I must have constructed the link incorrectly. Any ideas?  Thanks in advance for your help.

    I am trying to force the download of pdf files from a folder above the root.  The file below is named "download.cfm"  I pass the name of the file (Calendar.pdf) in the URL link, as follows: download.cfm?filename=Calender.pdf
    In the ColdFusion admin panel, I mapped a folder in the root "Docs"  to point to a folder with a different name above the root.   I have tried the code below, which was generously supplied by another member of this forum, but it does not seem to recognize the CF mapping. Do I need to use another CF Tag for the mapping to working correctly?
    <cfsetting enablecfoutputonly="yes">
    <cfheader name="Content-disposition" value="attachment; filename=""#Url.FileName#""">
    <cfcontent type = "application/pdf" file = "/Docs/#Url.FileName#">
    Thanks for your help

  • Force 1080p Movie Downloads from iTunes Store

    Hi everyone, my first post here.
    I know that you can change preferences for HD movies between 720 and 1080p in iTunes settings, and mine is set to 1080p. When I am about to download a movie I can see on the movie page that it says "Available in 720p and 1080p, downloading 1080p", and then it displays the size in GB of the 1080p file.
    HOWEVER, my concern is that when attempting to download a movie in 1080p with a device with a sub-1080p resolution (which includes every macbook except the Retina I believe) iTunes will automatically decide for you that the movie is larger than your screen and so it will download the 720p version. I have verified this by checking the resolution of the finished download, and also the size of the movie is ~1-2 GB (depends on the movie) smaller than the labeled 1080p size on iTunes store.
    I borrowed a 1080p monitor and tried again, and I was able to get a full 1080 download. I am positive that my settings are right, and that the movie in question is available in both resolutions. (I have tested this with many movies actually).
    So, yes it's true that my MBA screen resolution cannot handle 1080p movies, but my iPad can and so can my Apple TV so I don't think this arbitraty restriction is warranted. Anyone know of a way around this? I will not be buying movies from the iTunes store anymore if they are forced to 720p instead of 1080p resolution because of my Macbook Air. You pay the same amount of money for either resolution but one is significantly better and I am not able to download it (not trying to discuss whether 1080 is actually better than 720, with my TV setup it is).
    Worth mentioning: The above issues have been with RENTED movies only, I have not tried downloading a full length movie because I'm not about to spend $15 instead of $4 just to have this issue again. 
    Try this yourselves!!! Many of you have probably had this same problem for ages but not even realized it. This should make you angry! Would also be interested if the problem persists for purchased movies, if anyone has tested this.

    Same issue. I've been buying TV shows and movies on iTunes for a long time and copying them to my iPhone to watch on my TV. A few days ago, I tried to move a rented movie to my iPhone the same way I always did, click the "move" button next to the movie under the movies tab for the iPhone in iTunes when iPhone was connected and then click "apply". It would do a quick sync without copying anything.
    I thought I had a bum file, so I e-mailed Apple support and they reset the purchase so that I could redownload, which I'm doing now.
    But my recently downloaded episodes of Lost will also not copy to my iPhone. AND they will not even play on my iMac. When I try to play them, it shows only a grey screen with a progress bar. TV shows and movies purchased and downloaded weeks or months ago still play fine.
    No changes have been made to my system. After the rented movie didn't play and copy, I did a update check and downloaded and installed the latest versions of iTunes and the iPhone firmware. That didn't fix it. I have the newest versions of the Quicktime and iTunes. The computer is authorized for these purchases. The iPhone is authorized.
    I've looked at similar threads and have not found a solution. I'm stumped. If anyone has a solution let me know.

  • How do I force a re-download from I tunes store?

    My application, Frog toss, for my I touch, is corrupt. It will not load. SO I unchecked the sync box and it removed it from my I touch.
    Then when I restarted everything (I touch and computer) I re-checked the box.. Now it says the application file is not there.
    And when I went to the I tunes store, it said I downloaded it, but it will not allow me to re-download it.
    How can I force (make) it re-download it?
    I tried a global search on my HD for the file and it got erased somehow..
    Thanks.

    Try deleting it from the iPod and then redownlng it to the iPod by:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store

  • Force file download? Content-Disposition?

    Hello,
    I recently started using an X-Serve with OS X 10.4.8 installed.
    This is my media server, and I'm trying to configure it to force a file download dialog when an mp3 file is pulled.
    I used to do this by using an .htaccess file with the following:
    <FilesMatch "*.mp3">
    ForceType application/octet-stream
    Header set Content-Disposition attachment
    </FilesMatch>
    But it doesn't seem to work now.
    Do I have to add a new Content Handler? If so, what do I put to force a file download?
    Thanks very much

    See Oracle Metalink,
    ..Oracle Portal Technical Forum,
    ....Subject: PORTAL - uploading files (file attachments) with file names.
    This message thread outlines javascript code that automatically captures the filename during an upload.

  • Problem when printing Excel sheets when downloaded from Portal

    Hey,
    I am using the desformat=spreadsheet option to generate Excel files for my reports downloaded from Portal and this works fine. The trouble is that when users go to print the downloaded Excel reports it seems that the scale of the report changes and everything is made smaller to try and fit on the one page. The font size decreases, and the scale of the report decreases to the point where the report is nearly unreadable when printed. But when just viewing the reports in Excel everything looks fine.
    Any suggestions on why this is happening and how it can be fixed?
    Thanks

    Hello hermannedem,
    If you cannot see any content on pages you printed or in print preview, the cause might be margins which are set too high.
    #In order to check the margins, we need to go to ''File'' > ''Page Setup''.
    #Once this is done, switch to the ''Margins & Header/Footer'' tab.
    #Check what's set there under ''Margins''.
    The following are the default values for ''Margins'':
    '''Right''': 12.7
    '''Top''': 12.7
    '''Left''': 12.7
    '''Bottom''': 12.7
    Check these values accordingly and change them if necessary.
    Please let us know, if this resolves the issue.
    Thanks!

  • KM content for CE 7.1 trial downloaded from SDN

    Hi Team,
    I have installed CE 7.1 trial version which i downloaded from SDN. Now i want to configure KM content in the portal.But i am not able to find the KMContent tab in the Content Admin.Won't the trial pack comes with the KM part.If not can i apply any patch for KM alone for this CE 7.1 environment. Can you please share some info on this.
    regards
    Bharat.

    CE 7.1 is lean version of Portal. It does not have KM-C components.
    In case you want to have KM you will need NW Portal 7.0
    Chintan

  • Software Downloads from Portal Stuck

    I'm testing out installing software from the portal, and it looks like all of the downloads are getting stuck at 5%... It sits there for 5 to 10 minutes before I lose my patience and hit cancel. As far as I know, pushing the software to the client works
    fine, but downloading from the portal does not. Any ideas?
    -Ryan

    Ok, tried outside my network and it works fine. Can anyone give me an idea of what might cause the problem? Are there specific ports or ip addresses that need to be changed. I am behind a NAT firewall.
    Make sure your NAT Firewall allows for this traffic:
    http://technet.microsoft.com/en-US/library/jj676651.aspx
    Thanks,
    Jon L. - MSFT

  • How do I force mail to download older attachments in IMAP?

    I'm using (Snow Leopard) Mail to connect to gmail via IMAP.
    I'm running out of space and want to archive my gmail messages locally using Mail.
    The old gmail messages download and archive nicely, but Mail's leaving the attachments on the server. Is there some way I can force Mail to download all those attachments? There are too many to do it manually.

    I don't see an "advanced" tab in preferences. The is one under the "accounts" tab, but it doesn't offer a "Keep(ing) copies of message for offline viewing" option.
    Is this a difference between 10.5 and 10.6?
    Message was edited by: barryparr

  • Downloading blob content from a custom table

    In our hosted Apex application, the following code from the Application Express Developer's Guide works great for allowing a user to download blob content from one of our custom tables via a download button. However, the code doesn't work on the Oracle Cloud because the "owa_util" package is no longer available. The code is as follows:
    CREATE OR REPLACE PROCEDURE download_my_file(p_file in number) AS
    v_mime VARCHAR2(48);
    v_length NUMBER;
    v_file_name VARCHAR2(2000);
    Lob_loc BLOB;
    BEGIN
    SELECT MIME_TYPE, BLOB_CONTENT, name,DBMS_LOB.GETLENGTH(blob_content)
    INTO v_mime,lob_loc,v_file_name,v_length
    FROM file_subjects
    WHERE id = p_file;
    -- set up HTTP header
    -- use an NVL around the mime type and
    -- if it is a null set it to application/octect
    -- application/octect may launch a download window from windows
    owa_util.mime_header( nvl(v_mime,'application/octet'), FALSE );
    -- set the size so the browser knows how much to download
    htp.p('Content-length: ' || v_length);
    -- the filename will be used by the browser if the users does a save as
    htp.p('Content-Disposition: attachment; filename="'||replace(replace(substr(v_file_name,instr(v_file_name,'/')+1),chr(10),null),chr(13),null)|| '"');
    -- close the headers
    owa_util.http_header_close;
    -- download the BLOB
    wpg_docload.download_file( Lob_loc );
    end download_my_file;
    Besides using web services, does anyone know of a way to do this? Is there a way to add access to the "owa_util" package in the cloud? I have also tried apex_util.get_blob_file_src but that is also unavailable in the Oracle Cloud.
    Thanks,
    Steve

    Following Joel's advice:
    The way I solved this was to split the code between two page processes and one application process. The download button first calls a page process to move the report data into a blob column and then calls another page process which is of "run application process" type. This calls the application level process where the download code, shown below, is called.
    Notice the following changes to the code from the one posted earlier (also from Joel)
    1) added sys.htp.init;
    2) "sys." to all htp, owa and wpg_docload calls
    3) added apex_application.stop_apex_engine; after the wpg_docload statement at the bottom of the script.
    Now the download button launches a "save as" dialog box and the report content is downloaded to the client.
    The code now looks like:
    CREATE OR REPLACE PROCEDURE download_my_file(p_file in number) AS
    v_mime VARCHAR2(48);
    v_length NUMBER;
    v_file_name VARCHAR2(2000);
    Lob_loc BLOB;
    BEGIN
    SELECT MIME_TYPE, BLOB_CONTENT, name,DBMS_LOB.GETLENGTH(blob_content)
    INTO v_mime,lob_loc,v_file_name,v_length
    FROM oehr_file_subject
    WHERE id = p_file;
    -- set up HTTP header
    -- use an NVL around the mime type and
    -- if it is a null set it to application/octect
    -- application/octect may launch a download window from windows
    sys.htp.init;
    sys.owa_util.mime_header( nvl(v_mime,'application/octet'), FALSE );
    -- set the size so the browser knows how much to download
    sys.htp.p('Content-length: ' || v_length);
    -- the filename will be used by the browser if the users does a save as
    sys. htp.p('Content-Disposition: attachment; filename="'||replace(replace(substr(v_file_name,instr(v_file_name,'/')+1),chr(10),null),chr(13),null)|| '"');
    -- close the headers
    sys.owa_util.http_header_close;
    -- download the BLOB
    sys.wpg_docload.download_file( Lob_loc );
    apex_application.stop_apex_engine;
    end download_my_file;
    Thanks Joel for your help.
    Steve

  • My os x mavericks got crashed accidentely while installing the windows 8 and I am trying to reinstall using recovery console, but its take very long time and forcing me to download OS X 8 from internet, is there any where can I get offline download of OS.

    My os x mavericks got crashed accidentely while installing the windows 8 and I am trying to reinstall using recovery console, but its take very long time and forcing me to download OS X mountain lion from internet, is there any where can I get offline download of OS file where I can install directely OS X Mavericks.

    Hi, original poster here. I did not realize this would generate more discussion so I never checked back. I still had my warranty, so I took it to the store and got it repaired. The original problem I had was a screen with this icon flashing when I attempted to boot it up:
    When I took it to the store, they told me that my computer was unable to communicate with the hard drive. I had this same problem three times in two months where this screen reappeared. Each time I went back to the store and they said the cause was different, but they were all hardware issues that physically made it impossible to communicate with the hard drive. After the third time, they simply replaced my laptop and I haven't had the same problem.
    So in short: The reason you can't reinstall or move anything when you encounter this screen appears to be because nothing can communicate with the hard drive in the first place. You can't reach the disk or anything on it. So I don't believe it's possible to do anything besides take it to a physical store and have it fixed.

Maybe you are looking for

  • Issue with escaping characters and php

    Greetings, We are working on a web page using php and Oracle. We have troubles dealing with the diferent escaping characters when inserting/retrieving data (magic quotes is on but adding the backslash doesn't help :( ). We would like to know the corr

  • Open a File in a JTextPane via Drag and Drop

    Hi,      I have a simple JTextPane in a Swing App on Windows XP. I would like to know if it is possible for me to be able to add the functionality such that I can drag a text file to the JTextPane and it would open the file inside the Pane. Is this p

  • What happened with The Daily Show with Jon Stewart?

    Anyone notice that the The Daily Show with Jon Stewart has not been updated this week?. And I have just purchased a Multi-Pass.

  • HAP_DOCUMENT BSP redirect using the BADI HRHAP00_BSP_TMPL

    Hi all, Below is my issue: Last year, We have modified the BSP HAP_DOCUMENT by copying it to Y_HAP_DOCUMENT. Now we had to make further changes to the BSP which had to be template specific. So we used the BADI HRHAP00_BSP_TMPL to redirect the documen

  • SQL standard 2012 licenses for SCCM 2012 R2

    Hi, We are implementing SCCM R2 for customer, is the license for SQL standard 2012 included in price for SCCM licenses, we have around 5000 mahcines to be managed also a Secondary with express edition installed . can secondary and primary have differ