Zipfile download - how to control the save as filename?

We've sucessfully created a portlet which allows us to serve up a zipfile. However when we run it, the default filename is ...ZIP_DOWNLOAD_DYN_TEST.show - which is the name of the portlet. How do you control that filename? Searching the MIME information didn't yeild any help. If you change the name to something reasonable, the download does work.
For reference here is the code we used
<HTML>
<HEAD>
<TITLE>Drawing PDF</TITLE>
</HEAD>
<BODY>
<fort class="PortletText2">SLA PDF
<ORACLE>
declare
network varchar2(8);
begin
select nms.nms_customer_network.return_network_val
into network from dual;
nms.xx_download_1(network, 'SLA');
end;
</ORACLE>
</BODY>
</HTML>
and the database procedure...
CREATE OR REPLACE procedure xx_download_1 (p_Network in varchar2, p_DocType in varchar2)
is
-- this is trial code for file download... BGL 5/17/2002
-- thanks to technet and Dmitry!
l_size integer;
l_blob blob;
l_tmpblob blob;
l_mimetype varchar2(4000);
l_rowid urowid;
begin
htp.init;
SELECT zipfile INTO l_blob
FROM nms.ziptest
--WHERE NETWORK_NUMBER = p_Network
l_size := dbms_lob.getlength(l_blob);
dbms_lob.createtemporary(l_tmpblob,true);
dbms_lob.copy(l_tmpblob,l_blob,l_size,1,1);
owa_util.mime_header('application/zip', false,null);
htp.p('Content-length: '|| l_size);
htp.p('Pragma: no-cache');
htp.p('Cache-Control: no-cache');
htp.p('Expires: Thu, 01 Jan 1970 12:00:00 GMT');
owa_util.http_header_close;
wpg_docload.download_file(l_tmpblob);
dbms_lob.freetemporary(l_tmpblob);
exception
when others then
owa_util.mime_header('text/html', false);
htp.p('Content-length: 0');
owa_util.http_header_close;
end xx_download_1;

Hello Bryan,
look at message http://forums.oracle.com/forums/message.jsp?id=625164, there is a short but good description how to set a filename.
Ralf

Similar Messages

  • How to control the size of Database's image

    hi,
    I have already saved image in database, & i also can retrieve image from database. But My problem is that when i save big image then it shows with it's original size. But i want to see its size what i want? But how this possible?i want to see it's small size. i cannot do it. I know how to control the image with ImageIO . But i don'nt know how to control the size of an image from database. I cannot do it. Please Help me.
    Thanks
    bina

    Hi,
    You can control the database size at technical setting level based on ur requirement. Field name is Size category. 
    Thanks.

  • How to control the data  in data selection

    Hi,
    how to control the data  .
    in the transfer structure I am having 10 fields and and the file which is to be loaded contains 7 fields only.where can I control  the other 3 fields and how .
    thanks in advance
    karna

    If your source file is flat file, add extra three fields with blank (just add field separator say comma for each extra field) and then load. It should be ok.
    Hope it helps..

  • How to load and display the external flv video files in dynamicly and the how to control the flv fil

    How to load and display the external flv video files in dynamicly using AS 3.0
    and  How to control the flv file  add the play paus button and add seekbar.
    I have using to load the flv file following code
    var flvPlaceHolder1:MovieClip = new MovieClip();
    var vid1:Video = new Video(734, 408);
    flvPlaceHolder1.addChild(vid1);
    addChild(flvPlaceHolder1);
    flvPlaceHolder1.x = 1059;
    flvPlaceHolder1.y = 152;
    var nc1:NetConnection = new NetConnection();
    nc1.connect(null);
    var ns1:NetStream = new NetStream(nc1);
    vid1.attachNetStream(ns1);
    var listener1:Object = new Object();
    listener1.onMetaData = function(evt:Object):void {};
    ns1.client = listener1;
    ns1.play("GV-1600 TURNING.flv");
    ns1.addEventListener(NetStatusEvent.NET_STATUS, statusChanged1);
    function statusChanged1(ns1:NetStatusEvent):void
             trace(ns1.info.code);
            if (ns1.info.code == 'NetStream.Buffer.Empty')
                 trace('the video has ended');
                 removeChild(flvPlaceHolder1);
                 //trace('removeChild');
                gotoAndPlay(1786);
    then how to add the play,paus ,full screen button    and   seekbar,volumebar.

    I have to Create the flash presentation for our company product
    In this presentation the left  side the text animation are displayed then right side the our product video is displayed.
    In this presentation i need the following option :
    1, The first product video and animation is finished then the next product is played
    2, then the video displayed  (size width and height 400x300) , I click this video to increase the size(ex:1000x700)
    3, then the playing video i control  it play, stop, paus button and volume bar, seek bar.
    4, then this presentation is displayed on 42 inches LCD TV so this full presentation is run full screen.
    I have finished first two steps 1 and 2
    the following are the screen short and code:-
    code :-
    var count=0;
    var flvPlaceHolder2:MovieClip = new MovieClip();   
    var vid2:Video = new Video(734, 408);
    flvPlaceHolder2.addChild(vid2);
    addChild(flvPlaceHolder2);
    flvPlaceHolder2.x = 1059;
    flvPlaceHolder2.y = 152;
    var nc2:NetConnection = new NetConnection();
    nc2.connect(null);
    var ns2:NetStream = new NetStream(nc2);
    vid2.attachNetStream(ns2);
    var listener2:Object = new Object();
    listener2.onMetaData = function(evt:Object):void {};
    ns2.client = listener2;
    ns2.play("GS-4000.flv");
    this.addEventListener(Event.ENTER_FRAME, BtnFadeIn2);
    function BtnFadeIn2(event:Event):void
        if (this.currentFrame == 387)
            /*flvPlaceHolder2.x = 30;
            flvPlaceHolder2.y = 140;
            vid2.width=1800;
            vid2.height=800;
            trace('Screen size is changed');*/
            if(count==0)
            flvPlaceHolder2.x = 30;
            flvPlaceHolder2.y = 140;
            vid2.width=1800;
            vid2.height=800;
            count++;
    ns2.addEventListener(NetStatusEvent.NET_STATUS, statusChanged2);
    function statusChanged2(ns2:NetStatusEvent):void
        trace(ns2.info.code);
        if (ns2.info.code == 'NetStream.Buffer.Empty')
                trace('the video has ended');
                 removeChild(flvPlaceHolder2);
                 //trace('removeChild');
                gotoAndPlay(433);
    flvPlaceHolder2.buttonMode=true;
    flvPlaceHolder2.addEventListener(MouseEvent.CLICK,home2);
    function home2(e:MouseEvent):void
        if(vid2.width==734 && vid2.height==408)
            flvPlaceHolder2.x = 30;
            flvPlaceHolder2.y = 140;
            vid2.width=1800;
            vid2.height=800;
        else
            flvPlaceHolder2.x = 1059;
            flvPlaceHolder2.y = 152;
            vid2.width=734;
            vid2.height=408;

  • How to control the measure based on the related dimension.

    Hi Experts,
    In order to improve performance, I have created three kinds of time tables in DB,such as Year .Month, Day.
    Then import them into the physical layer in RPD, and combine them into one dimension in BMM.
    Actually, it has three level fact related with three time tables,so they are also dragged into one fact in BMM,and one column will be corresponding with three column derived from different Fact table in physical layer.
    So I want to know how to control the measure based on the related dimension.
    For example:
    when users drag the Year,Sales column, it will come from Year Dimension and Year Fact Table.
    when users drag the Month,Sales column, it will come from Month Dimension and Month Fact Table.
    when users drag the Day,Sales column, it will come from Day Dimension and Day Fact Table.

    Hi,
    Create a dimension Hierarchy, with Year >> Month >> Day Levels and
    Next Double click on Year Table LTS >> click on Ocntetnt Tab >> set as Year
    same way for Month LTS and Day LTS.
    So now when you select year column then server canknow which LTS to hit and Hits Year LTS.
    Mark If Helpfu/correct
    Thanks.

  • How to trace the save menu in cs3 using javascript?

    i can able to add menu items using the following syntex
    app.scriptMenuActions.add("Script 1");
    but i dont know how to trace the save menu, i want to do certain action while the user try to save their active document.
    is it possible in script?
    thanks
    subha

    Hi subha,
    re: "i dont know where to get that BeforePrint.jsx, but by using scripting guide i able to trace the menu events."
    All of the scripts shown in fragmentary form in the Scripting Guide are included in the associated scripts archive on the InDesign Scripting home page.
    The BeforePrint.jsx script shows how to cancel the display of the Print dialog box; I assume that the same techniques will work for the Save dialog box. No time to check right now.
    Thanks,
    Ole

  • How to control the size of live data in Coherence?

    How to control the size of live data in Coherence?
    See the following statement:
    Pause times increase as the amount of live data in the heap increases. We recommend not exceeding 70% live data in your heap. This includes primary data, backup data, indexes, and application data.
    --Excerpted from http://coherence.oracle.com/display/COH35UG/Best+Practices                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    In any Java program, it is good practice to make sure your live objects leave some room in the heap for "scratch space." Without this, you will spend too much time in GC, and, in the worst cases, run out of memory. In the general case, you can see how much live data your application requires by looking at the heap used after a full GC's. For Coherence, you should ensure that live data, as you say, is under 70% of the maximum heap size.
    Coherence provides you tools to help enforce this policy. [http://coherence.oracle.com/display/COH35UG/local-scheme] describes how to size limit your cache. By implementing an eviction policy, you can control what happens when a size limit is exceeded.

  • How  to get  the  Save  dialouge box  in   SAP Business One

    Hi,
    How  to get the  Save dialouge box in    Button  click  event  in  SAP Business One.
    Thanks,
    Y.

    Hello,
    You would like to display an SaveFileDialog box?
    may follow this thread, and you can find a sourcecode in vb.net and c# inside (for open dialog, but it is the similar...)
    Regards
    János

  • HOW TO MAKE THE SAVE BUTTON IN GREY MODE IN QA32 INTIAL SCREEN

    Dear friends,
    How to make the save button , in the tcode QA32  intial screen in GREY MODE.
    As  i don't want the screen variant created by me should not be seen by the user.

    Hi
    There is one option ,You can protect yor varient but not hide it.
    To protect>QA32>Mydefault>Varient Attibute>click on protect varient.
    If you select the field Protect variant, the variant can only be changed by the person who created it or last changed it.
    I hope this can be one of the solution
    Regards
    Sujit

  • How to Enable the SAVE button in the Menu Bar of the Invoice Document.

    Hi.
    How to Enable the SAVE button in the Menu Bar of the Invoice Document as it is disabled for me.
    I would like to save the Invoice document in PDF  format.
    Regards
    Irfan

    Hi,
    Normally, for the archiving or generation of the invoice document in PDF format is handled by maintaining the output records through VV31/VV32 with the relevant printer, storage mode ( 3- print and archive or 2- archive only ), no. of messages ( means no of copies ) in the communication method.
    Then when you click the print button through VF03 in the print options pop-up you get a print at the physical printer and at the same time an archived copy ( PDF copy ) attached with the document.
    So, please make sure the output records are fine to allow a PDF copy generated and then try to print and check in VF03 by entering into the billing document.
    Hope this helps you.
    However, from the print preview you normally would not be allowed to save or print.
    Regards,
    Ram
    Edited by: Ramakrishna Peri on Apr 3, 2009 9:16 AM

  • How could control the scroll events in ALV OO?

    Hello experts!
    I'm programing a report, inside there is a field that need time of processing. I'm using ALV OO.
    I have thought that it could only calculate the field for the lines that visualize.
    How could control the scroll events to calculate the field of the visualized lines?
    I'm using CL_SALV_TABLE class and cl_salv_events_table to control the events, but there aren't any event to control the scroll.
    best regards!

    Hi Sriram,
    I did view the information that you was attaching, but this don't resolve my problem. With methods get_scroll_info_via_id and set_scroll_info_via_id, we can get and put information of selection and view rows in the screen but we don't control when the user click in the scroll for advance or to back down a page.
    I would like to refresh the data in ALV when the user view news rows.
    I want your genial ideas.
    Best regards!

  • How to control the size of SVG images in epub files?

    There is unfortunately no support for SVG files in InDesign.
    Most of my images in jpg convertes nicely, but the small ones do not.
    Therefore I want to use SVG files which I have created in Illustrator.
    But how do I set the size in the epub file? Right now, whatever I do, they come out too big and I don't know how to control the size.
    Is there a program, like Sigil or other, that can place the image for me - I'm no html wizard you see....

    In any Java program, it is good practice to make sure your live objects leave some room in the heap for "scratch space." Without this, you will spend too much time in GC, and, in the worst cases, run out of memory. In the general case, you can see how much live data your application requires by looking at the heap used after a full GC's. For Coherence, you should ensure that live data, as you say, is under 70% of the maximum heap size.
    Coherence provides you tools to help enforce this policy. [http://coherence.oracle.com/display/COH35UG/local-scheme] describes how to size limit your cache. By implementing an eviction policy, you can control what happens when a size limit is exceeded.

  • How to control the looping time of the for loop in 10 microseconds in labview?

    I need to create a +/- 9 volt square wave with period of 20us using a D/A card (Not NI card). I can write command to the card using outport provide by Labview. Right now, I can generate square wave with 4ms period which is limited by the resolution of the wait until next ms icon I used inside the for loop. Could anyone tell me how to control the execution time of the for loop to about 10 us? Your help would be much appreciated.

    I'm not sure if this will hep, but this answer seems to answer this question
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=50650000000800000029410000&UCATEGORY_0=_30_%24_12_&UCATEGORY_S=0&USEARCHCONTEXT_QUESTION_0=microsecond+resolution+1ms&USEARCHCONTEXT_QUESTION_S=0

  • How to control the number of fields in the Advanced mode in af:query

    Hi,
    How to control the number of fields in the Advanced mode in <af:query>?
    Say i have 20 fields in my table and i created a view criteria with 2 fields. It would work perfectly in Basic mode. But in the Advanced mode all other fields selection is possible on clicking the ADD Fields button. I did not want the client to make a search with all 20 fields. Only 10 fields are to be listed in the Advanced Mode even though there are 20 fields in my table.
    How do i control the list of fields in ADDFields button?
    Any ideas?
    KR

    You can uncheck the Querable property of the attributes which you need not show up in the Advanced Mode (but they will not show up in other modes too !) or programatically set the same as mentioned here -
    http://adfcodebits.blogspot.com/2010/11/bit-27-setting-view-object-attributes.htmlAlso you can hide the AddFields button as suggested here - http://www.notjustjava.com/2011/12/cool-tips-to-showhide-components-of-the-query-control-of-adf/

  • How to control the opening form multiple times

    Greetings to all,
    I used Open_Form to open the form in my 'Menu.mmb'.
    My Question is:
    How we control the opening of a form from multiple times?
    Ex:
    In my menu.mmb I used OPEN_FORM.If we open the form,which was already opened ,I want to stop the form to open. How to do this?
    Thanks,
    Bhujendra

    pls try with
    FIND_FORM('EMPDETAILS1');
    OPEN_FORM('C:\INH\EMPDETAILS1');
    jeneesh                                                                                                                                                                                           

Maybe you are looking for

  • Adobe Illustrator CC 2014 quit unexpectedly.

    Just updated to the latest Adobe Illustrator CC, today, 10/6/14 through Creative Cloud. I am using a MacBook Pro 2011, and OS 10.8.5. After updating several Adobe apps, and attempting to launch Illustrator, I received the message, "Adobe Illustrator

  • Thunderbolt not being seen on My Verizon account

    When I log onto my account, I see the Incredbile picture associated with my son's number; the BB Tour with my wife's number and next to my number, the phone is blank and is just called Primary Line.  My phone works fine but I did replace sim card abo

  • Query regarding session timeout

    Hi all, I have a scenario. My OAF page session gets timed out after 15 minutes and prompts me to login again. But before logging in, I just clicked on the back button of my browser and I was able to see the previous page. Can anyone please advise me

  • WQL Query for Last Policy Request

    I'm trying to create a collection based on workstations whose last policy request was more than 30 days ago and I'm having trouble with the query statement.  Any help would be greatly appreciated.

  • Mac Pro USB bluetooth dongle install?

    Mac Pro 2006 with no Bluetooth card, I want to use my apple wireless keyboard/mouse and trackpad. Bought the IOGear GBU521 USB Bluetooth Dongle. I have a fresh install of Lion on an SSD Drive and another on a Hard Drive.  I have no Bluetooth Icon in