Multiple file download issues

Hi All,
I have designed an APEX application to download multiple files. I have check box in each row of the file name and a download button.
When the users checks set of checkboxes and click on the "Download" Button, i am expecting the marked files to be downloaded. I am encountering the below issues in this implementation(i.e single file download is fine):
1. When ticks all the check boxes and click download, the files are never downloading. The target URL goes something like this :
www.example.com/abc/bcd/wwv_flow.accept
and there is a cross icon in the new page. No download happening.
2. When ticks few files and leave rest of the files un-checked, there are either junk charactes in target page (or) only the last checked box file alone downloading.
Please refer the code below and advice. Thanks very much in advance.
Code:
=====
declare
check_box_val varchar2(500):=' ';
file_name varchar2(500):=' ';
begin
for i in 1..htmldb_application.g_f01.count
loop
check_box_val:=nvl(htmldb_application.g_f02(i),' ');
if(check_box_val<>' ') then
sho_pdf(check_box_val);
end if;
end loop;
exception
when others then
null;
end;
sho_pdf.sql
========
CREATE OR REPLACE PROCEDURE FDM_UAT14.sho_pdf(p_file in varchar2)
AS
l_blob BLOB;
l_bfile BFILE;
BEGIN
DBMS_LOB.createtemporary (l_blob, TRUE, DBMS_LOB.SESSION);
l_bfile := BFILENAME ('UPDOWNFILES_DIR', p_file);
DBMS_LOB.fileopen (l_bfile);
DBMS_LOB.loadfromfile (l_blob, l_bfile, DBMS_LOB.getlength (l_bfile));
DBMS_LOB.fileclose (l_bfile);
OWA_UTIL.mime_header ('application/octet',
bclose_header => FALSE);
HTP.p ('Content-length: ' || DBMS_LOB.getlength (l_blob));
HTP.p( 'Content-Disposition: filename="' || p_file || '"' );
OWA_UTIL.http_header_close;
WPG_DOCLOAD.download_file (l_blob);
DBMS_LOB.freetemporary (l_blob);
EXCEPTION
WHEN OTHERS
THEN
NULL;
END;
/

I have read that "patch number 8548651" need to be applied in order to download multiple files in Single Page. Is it true? Pls refer this page :
http://dgielis.blogspot.com/2010/01/oracle-application-express-patch-set.html
8555172 -- BLOB download links are incorrect when multiple file items referenced on a page.

Similar Messages

  • Multiple File Download Issue

    Hi
    In my application there is a attachments section, which displays all the attachments in a table with file name as LinkToAction UI element, in the action handler of the link i am using CL_WD_RUNTIME_SERVICES=>ATTACH_FILE_TO_RESPONSE method to push the attachment to the client.
    when i click the 3 links simultaneously it opens the 2 attachments but the 3 rd click hangs and returns in page not found error.
    Is this behaviour anything to do with ICM parameters or a bug? I am running SAP_BASIS component SAPKB70010
    Thanks
    Abhi

    Thomas Jung wrote:>
    > What do you mean - "When you click three links simultaniously"? You can't really click them simultaniously.  Do you mean that >you just click all three really fast?  I'm a little confused. 
    when i click the first link it opens the download dialog, keeping that dialog untouched i am able to click the second link and it opens the download dialog, similarly when i click the third link it hangs.
    >The browser limits the number of simultanious downloads - generally to two
    I think this is the reason for the behaviour, when i open or save the second download dialog, the third dialog is opened, can we change this limitation of the browser?
    >It could be that the server cache is timing out waiting its turn for the third download.
    I think this is not the problem. if it times-out, it will return a short dump but it says page not found.
    Thanks
    Abhi

  • ZIP File has damaged contents - Multiple file download

    Hi,
    I am using ZIP API in Web Dynpro JAVA for multiple file download scenario.
    Issue:--->
    Some files are not opening correctly after unzipping the ZIP file.
    Example-1: some PDF files gives out message that " "
    Example-2: Also, a JPG file shows only upper half of the image.
    So in all, the content of generated ZIP file are damaged.
    Any idea why this is happening?
    Thanks & regards,
    Amey

    And this is the code I'm using:-
    Unzipped PDF files give this error --> There was an error opening this document. The file is damaged and could not be repaired
    for(int i = 0; i < l_int_NodeSize; i++){
         g_SearchOutputEle = g_SearchOutputNode.getCtx_vn_SearchOutputElementAt(i);
         java.net.URL url = new URL(g_SearchOutputEle.getFileUrl());
         java.net.URLConnection urlConnection = url.openConnection();
         java.io.InputStream inputStream = url.openStream();
         int arraySize = urlConnection.getContentLength();
         byte[] byteArray = new byte[arraySize];
         DataInputStream dis = new DataInputStream(inputStream);
         dis.read(byteArray);
         ZipEntry zipEntry = new ZipEntry("Name-"+i);
         zipEntry.setSize(byteArray.length);
         zos.putNextEntry(zipEntry);
         zos.write(byteArray);
         zos.closeEntry();
    zos.close();
    byte[] byteOutArray = baos.toByteArray();
    IWDResource resource = WDResourceFactory.createResource(byteOutArray, "Downloads.zip",WDWebResourceType.UNKNOWN);
    String urlString = resource.getUrl(WDFileDownloadBehaviour.ALLOW_SAVE.ordinal());
    IWDWindow win_MultiFileWindow = wdComponentAPI.getWindowManager().createNonModalExternalWindow(urlString);
    win_MultiFileWindow.setWindowSize(0,0);
    win_MultiFileWindow.show();
    Edited by: Amey Mogare on Mar 30, 2010 7:49 AM

  • Problem with multiple file download

    Good day.
    I have a code that downloads multiple files from the database and then saves it to a specified directory. I work fine but when I check the contents of the file, some of them are not complete. Lets, say I have downloaded 16 files and only file # 4,5,6,7 have the correct contents as compared to the original.
    Why is that so?
    my code snippet:
    DiskFileUpload fu = new DiskFileUpload();
              fu.setSizeMax(1000000000);
              List fileItems = fu.parseRequest(request);
             Iterator itr = fileItems.iterator();
              while(itr.hasNext())
              FileItem fi = (FileItem)itr.next();
              if(!fi.isFormField())
                     String filen = fi.getName();
                     String fname = filen.substring(filen.lastIndexOf(java.io.File.separator)+1);
                   Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
                   connection = DriverManager.getConnection(connectionURL, "", "");
                   statement = connection.createStatement();
                   String sql = "INSERT INTO tblTestFiles("
                                    + "strFileName,"
                                    + "imgFile) "
                                    + "VALUES(?,?)";
                 PreparedStatement pstmt = connection.prepareStatement(sql);
                   //Set the values for strFileName and imgFile
                   pstmt.setString(1,fname);
                   // Set the blob
                   //File file = new File(fnew);
                 FileInputStream is = new FileInputStream(filen);
                 pstmt.setBinaryStream(2, is, (int)filen.length());
                     // Insert the row
                 pstmt.executeUpdate();I am using eclipse 5.5.23, eclipse 3.2 with myeclipse SDK, MS SQL, Ant.

    sorry I posted the wrong code. here's the correct one:
    statement = connection.createStatement();
            rs = statement.executeQuery("SELECT strFileName,imgFile FROM tblTestFiles ORDER BY strFileName");
            while (rs.next())
                   String filename = rs.getString(1);
                Blob blob = rs.getBlob(2);
                   InputStream is = null;
                   is = blob.getBinaryStream();
                   int i;
                   String dir = "C:\\DownloadedFiles";
                   File path = new File(dir, filename);
                   FileOutputStream fos = null;
                   fos = new FileOutputStream(path, true);
                   PrintWriter pout = null;
                   pout = new PrintWriter(new FileOutputStream(path,true));
                   while ((i = is.read()) != -1)
                      pout.write(i);
                   fos.close();
                   pout.close();
             }// end of if construct
        }// end of try
         catch (IOException e)
             e.getMessage (); e.printStackTrace();
              System.out.println(e);
        catch (SQLException e)
             e.getMessage (); e.printStackTrace();
              System.out.println(e);
        }Thanks.

  • J2SE Multiple file download?

    Does anyone know whether the J2SE can be downloaded as multiple files?

    I don't think there is, are you asking this because you are on dial-up? If you are you can always get a dl manager to help you out with that, it allows resuming and what not for whenever you are online. I haven't personally used a dl manager for a really long time, but I used to use getright.

  • Seeing multiple file download dialogs trying to download one file.

    I'm seeing some strange behavior from an application that uses the Safari Webkit to download a file from within the app. When I click the 'download' button I get cascading file download dialog boxes. Sometimes it is only two and sometimes it is 15+. Has anyone ever heard of this before????? Could it potentially be related to Java script or the version of Java?
    Thanks!

    Yes I've been in contact with the developer and they aren't sure what the issue could be as it seems to be happening for only a few users. From what they can tell it is only on Leopard. They use an SDK that calls into the Safari webkit, so they thought it might have something to do with my Safari preferences.

  • Problem with multiple files download (OD 6.0)

    Please, help me :(
    I have a proble with installation of Developer 6.0 after I
    downloaded multiple files and joined them.
    At command prompt it says "The program is too big to fit in
    memory" or something like it. (623K of conventional memory at
    that time).
    Do you know how to solve this problem. I will appreciate your
    help very much.
    Thank you.
    Leonid Roodnitsky
    null

    Please, help me :(
    I have a proble with installation of Developer 6.0 after I
    downloaded multiple files and joined them.
    At command prompt it says "The program is too big to fit in
    memory" or something like it. (623K of conventional memory at
    that time).
    Do you know how to solve this problem. I will appreciate your
    help very much.
    Thank you.
    Leonid Roodnitsky
    null

  • Multiple file downloads

    Hi everyone,
    I am trying to download multiple files using the code below. Unfortunately, the window only pops up allowing me to save the first file but not subsequent ones. (e.g. if there are two files to be saved, only the first one is deleted) Could anyone help me out here? Thanks in advance.
    public void doPost (HttpServletRequest request, HttpServletResponse response) throws IOException {
    response.setContentType("/");
    HttpSession session = request.getSession(true);
    Vector filesToSend = (Vector) session.getAttribute("files");
    for(int i=0; i < filesToSend.size(); i++) {
    File resultsFile = (File) filesToSend.get(i);
    String resultsDisplayFile = resultsFile.getPath();
    response.setHeader("Content-Disposition", "attachment;filename=\""+resultsDisplayFile+"\";");               
    ServletOutputStream toFile = response.getOutputStream();
    BufferedInputStream inFileStream = new BufferedInputStream(new FileInputStream(resultsDisplayFile));
    int data;
    while((data=inFileStream.read()) !=-1)
         toFile.write(data);
    inFileStream.close();
    toFile.close();                    
    resultsFile.delete();
    }

    A servlet can only send one response to a request. So, you can only download one file at a time. The usual way to download many files in a single response is to package them in a zip archive and download that.

  • Multiple file upload issues

    I'm trying to create a simple web form capable of uploading multiple image files. I've followed the instructions as per  July 12, 2012, " Customizing Web Forms", "Adding multiple file attachment fields to the web form" and everthying seems to indicate that's it working, however when I go to "related files under cases I only see one file. Any ideas?

    Yes, you'll find it here: http://www.pikassopets.com/order/upload

  • Window 7 32 bit client machine dot net exe running in IE8 or IE9 from server security warning file download issue

    Help me in the issue, Asp dot net exe which run from server in IE 8 window 7 32 bit client machine show security file save download message. This app was running fine if we don't apply any window 7 or IE8 patches. same issue when running in
    IE9. I already run the caspol, add the server link to trusted site with low security. I wonder why it was working fine without any patches.
    I just found that client machine win 7 32 bit has dot net 4.5.1 installed when updated all the patches. after uninstall the dot net 4.5.1. the application worked fine. now I wonder what are the settings need to change to run the application with dot net 4.5.1
    installed on machine. as Microsoft always has these things in window updates. thanks in advance.

    Hi Gparhar,
    In case you are posting on .NET setup forum, I suspect it is not the right forum for your issue, we talks about "setup and deployment of .NET Framework.", if you have problem on installing and uninstalling .NET 4.5.1, we can share you some advice.
    For your specific case, I recommend you consult ASP.NET forum instead:
    http://forums.asp.net/
    Regards,
    Barry Wang
    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.

  • Mod_osso folder protection and file download issue

    We are using 10.1.2.2 AS with SSO. I have a directory under the htdocs directory that I have specified to be protected via SSO. This part works fine.
    I have a protected directory of log files which works fine. Even a log file of 54M downloads fine.
    I have a protected DOCS folder that contains
    1 .doc file 4.9M,
    1 .doc file 78K
    1 .pdf file 2.1M
    After the user logs in via SSO, they can download the .pdf and the small .doc file, but the large .doc file gives the following error message:
    Internet Explorer cannot download largefile.doc from localhost
    Internet Explorer was not able to open this Internet site. The requested site is either unavailable or cannot be found. Please try again later.
    This has also happened to me in the past with large .zip files.

    Hi!
    I had wondered whether it was the websites issue: i've since managed to get the application-my friend downloaded it onto his phone over the internet and Bluetoothed it to me, so i've got it anyway. Just a bit strange, as i transfereed the file to my Mac and it decompressed into a folder again...
    Oh well-i'm not into fiddling around so it can stay as it is! Thanks for the reply!

  • Powl File Download issue

    Hi All,
    I have a requirement of downloading data from a POWL feeder class into an ASCII format file. Within the method, GET_OBJECTS of the feeder class, I am calling the method cl_wd_runtime_services=>attach_file_to_response and passing the internal table data as below. The itab data has been converted to string format into variable lv_text.
    CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
           EXPORTING
             text   = lv_text
           IMPORTING
             buffer = itxstring.
    CALL METHOD cl_wd_runtime_services=>attach_file_to_response
           EXPORTING
            i_filename      = 'TEST.txt'
            i_content       = itxstring
             i_mime_type     = 'NOTEPAD'
            i_in_new_window = abap_false
             i_inplace       = abap_false.
    On execution, this gives a dump 'Access using a zero object reference is not possible'.
    Does anybody have any idea of why this dump is occurring. Please let me know if there is any other way of downloading internal table data from POWL   into a file on presentation server.

    I solved this issue in my environment Apex 3.2.1
    I did not see this solution posted here so thought I should update this thread.
    It is basically the security that is preventing the call of your "download_my_file" proceedure.
    If you look in the Apache log you will see the error as well.
    There is a FUNCTION called "Wwv_Flow_Epg_Include_Mod_Local" owned by APEX_030200.
    You must edit this function to allow your own version of "download_my_file" to be authorized.
    Edit this part of the validation below to include YOUR function.
    Note that I used every possible combination of the function call in case you call it slightly differently from different places in your App.
    IN ('','DOWNLOAD_MY_FILE?P_FILE','SAFETYRISK.DOWNLOAD_MY_FILE?P_FILE','SAFETYRISK.DOWNLOAD_MY_FILE','DOWNLOAD_MY_FILE','PMO.DOWNLOAD_PMO_FILE','DOWNLOAD_PMO_FILE')
    Hope this helps.
    If nothing else I'll find my own note next time I have to look this up.
    Ray
    CREATE OR REPLACE FUNCTION APEX_030200.Wwv_Flow_Epg_Include_Mod_Local(
    procedure_name IN VARCHAR2)
    RETURN BOOLEAN
    IS
    BEGIN
    -- RETURN FALSE; -- remove this statement when you modify this function
    -- Administrator note: the procedure_name input parameter may be in the format:
    -- procedure
    -- schema.procedure
    -- package.procedure
    -- schema.package.procedure
    -- If the expected input parameter is a procedure name only, the IN list code shown below
    -- can be modified to itemize the expected procedure names. Otherwise you must parse the
    -- procedure_name parameter and replace the simple code below with code that will evaluate
    -- all of the cases listed above.
    -- IF UPPER(procedure_name) IN ('') THEN
    IF UPPER(procedure_name) IN ('','DOWNLOAD_MY_FILE?P_FILE','SAFETYRISK.DOWNLOAD_MY_FILE?P_FILE','SAFETYRISK.DOWNLOAD_MY_FILE','DOWNLOAD_MY_FILE','PMO.DOWNLOAD_PMO_FILE','DOWNLOAD_PMO_FILE') THEN
    RETURN TRUE;
    ELSE
    RETURN FALSE;
    END IF;
    END Wwv_Flow_Epg_Include_Mod_Local;
    ----------------------------------

  • AL11 File Download Issue

    Hi,
    I had a report which is executed in Background and its output is stored in a .txt file on Application Server.
    I had used field seperator as '#' . I am downloading that file into an 'excel' file directly from AL11 (not from any ABAP coding) .
    File contains more than 70000 records, but when i look into the downloaded file , many rows are not getting downloaded correctly even everything is correct in AL11. Some rows has many fields missing , many rows get merge into one cell and some are coming correctly.
    So, can anyone help me that what is the issue. Is the field seperator is incorrect?
    Thanks in Advance

    Hi Mayank,
    I think you have some special chars in the downloded content. For that reason it is not coming in proper format.
    In my opinion you need to use '|' as seperator. Then d/l it in presenatation server in .txt format. Then open excel application then open the .txt file as '|' as separator.
    Regards,
    Amitava

  • Excel file download issue

    Hi Experts,
    I am downloading an excel file which is stored at the MII server using JSP file. I am using the below code for the same. I am able to download the excel file successfully but when I open the same I get some junk value as content. I mean to say the content is not at readable format. I have tested the java code using standalone program where it worked successfully.
    I  tested this JSP at MII 12.2 and MII 14.0 and both provided same result. I have attached the screenshot of excel how it looks after opening
    I want to know is this a problem with Netweaver web server?. I mean the way it runs JSP. Unfortunately I could not test this on another web server
    Any help on this is very much appreciated.
    <%
      String filePath = "C:\\myfile.xls";
      try
      FileInputStream in = new FileInputStream(filePath);
      response.setContentType("application/vnd.ms-excel");
      response.addHeader("content-disposition","attachment; filename=" + filePath);
      int octet;
      while((octet = in.read()) != -1)
      out.write(octet);
      in.close();
      out.close();
      catch(Exception e)
      out.println("Exception occured:"+e);
    %>
    Thanks
    Shaji

    Hi Christian,
    Thanks for your response.
    I tried that as well but same result. I get a alert message as below while opening the file.
    "Excel cannot open the file Demo.xls because the file format or file extension is not valid. Verify that file has not been corrupted and that the file extension matches the format of the file"
    I am trying to run the same file on another web server such as tomcat and see if the issue persist.
    Thanks
    Shaji

  • File download issue through ASA

    Hi,
    We have ASA 5540 with 8.2 SW. We are trying to download a file (3 MB pdf)  from https session which fails if done behind the firewall. In case, the client bypasses firewall, the file gets downloaded as usuall. Interesting thing here to note is that when client is behind the firewall, its takes a long time to download the file and the file size always 312 Bytes, of course its a corrupt file.
    We have chaged the MSS setting but did not help.
    Did anybody face such problem before?
    Thanks
    Saif

    Hello,
    I would like too see the logs at the time you are facing the issue, when the download its slow.
    Is it possible that you could provide your ASA configuration,
    Are you using a CSC-SSM or AIP-SSM?
    Regards,
    Julio.

Maybe you are looking for