Multiple file download

I'm using FileReference.download() to download a single file from a server to a local machine.
The download() function opens a dialog box where the user select where he wants to save the file and what name give to it.
Is it possible to download X files in sequence without calling X FileReference.download() and so X dialogs open?
A single download() with more files?
Multiple download() but without the dialog box?

i doubt it, if that was possible it would provide a major security hole that could be exploited.
I developed a FTP application in flex for a client a while back, and that's when i did most of my searching around to see if this was possible, and couldn't turn up anything apart from people saying it wasn't possible.
I'd be very interested to hear if someone say it is, but until then i believe the only way to accomplish something like this is like a said, a server side script to handle all selected file references for download, zip them up and then allowed the user to download that zip file.
I imagine, it might be possible in AIR (considering that has far greater access to the local machine), but as far as a flex app goes, i'm pretty confident to say it's not possible.
let me know if you find out otherwise though.

Similar Messages

  • 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

  • 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.

  • 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.

  • 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.

  • 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.

  • 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

  • Is there a way to allow multiple file downloads..

    with 1 click? Instead of clicking "download to" for each file.
    I have a page that will query a db with the user supplied variable and return several (10 or more) files on a page which displays the return values as links that launches the download dialog box when clicked. Is there a way to have only 1 download dialog box that will allow the user to determine where to save the files to, and begin downloading all 10+ files in succession without user intervention? Or possibly a script that will run winzip on all of the files that the user checked and when the user selects download to, the script zips the files and begins downloading the .zip file.
    TIA!!

    Well... no and possibly. In general, I would say that this is not possible from one link, short of concatenating the files into one, but that would require the user to split them later. Obviously not what you want.
    I think you could mimic this by creating a page with frames, where one frame is really small. And use JavaScript or META refresh tags in the larger area to set the source of the small frame to the file you want download. You do this after a few seconds delay to get each next file, so that it gives the user time to do a save as. Of course, this could end up being a headache for the user if they aren't fast enough or if your next file comes too fast. So I would recommend not bothering.

  • Download Multiple Files?? (Servlets/Jsp)

    Hello Forum Members,
    I need to download multiple files from Server on a single click of button thats says "download". Using Servlets/Jsp only( I don't want to use applets/or Zip the files).
    The scenario would be on the browser I will have 'n' number of checkboxes each corresponding to a file and there is a button that say's download. Once I click "download" the browser should prompt me to save in a directory.

    I don't know if there's a Java implementation already out there (i'm sure there must be), but I think you'd need a separate Download Manager to be able to handle multiple file downloads. I'm all but positive that the standard download isn't gonna cut it, especially if the user selects a whole bunch of files. I don't think the built in download function allows for more than one file to download at a time, so unless you want a whole bunch of download windows all going at once, you'll need to either find (or implement) something that can.

  • Multi-file download possible?

    I currently use FileReferenceList for uploading multiple
    files at once, and there has been great interest in providing the
    opposite - so a user selects multiple files on the website, clicks
    'download', and all files are delivered to the chosen folder on the
    user's local machine.
    We currently achieve this with zip but it would be amazing to
    have them downloading individually, all at once, and only having
    the select the download destination once.
    Possible?

    Hi,
    multiple file downloads may be easier to accomplish because you would use a Servlet for this that then streams the content in a loop.
    Te file upload only operates one file per component, which means that you would have to use multiple inputFile components with individual managed bean methods.
    Haven't read about any other solution here on this forum
    Frank

  • Download multiple files in one step

    Hi,
    my first try with acrobat.com with uploading some pictures which I like to share with friends led me to the question, how they can download my 18 pictures in one step. I put them in a workspace and gave them access. You can mark all files, but there is no menu point which offers you to download all files in one step.
    Is there a way to do this in one step?
    Greetings
    Mario

    Hello Mario,
    Thank you for posting. Unfortunately, there is currently no way to download multiple files at once; this functionality is high on our list of planned enhancements, so I encourage you to stay tuned for future releases.
    Best regards,
    Rebecca

  • Aria2 does not download multiple files at a time

    I'm trying to speed up my system upgrades by using aria2, but it won't speed up anything as it does not download multiple files at a time.
    As per this wiki post, https://wiki.archlinux.org/index.php/Im … erformance , "using aria2", I've installed aria2 and added the line
    XferCommand = /usr/bin/aria2c --allow-overwrite=true -c --file-allocation=none --log-level=error \
    -m2 --max-connection-per-server=2 --max-file-not-found=5 --min-split-size=5M --no-conf \
    --remote-time=true --summary-interval=60 -t5 -d / -o %o %u
    to the options section in pacman.conf. Pacman still works, but it isn't sped up. When pacman -Syu'ing, a normal line shows:
    #1 SIZE:1.3MiB/2.0MiB(63%) CN:1 SPD:50.0KiBs ETA:15s
    What's going on?
    P.S. I use the line reflector -l 5 --sort rate --save /etc/pacman.d/mirrorlist before doing a system upgrade.
    Last edited by bruno321 (2011-05-15 15:27:45)

    Using aria2c will download files over 5MB with multiple connections but will not download multiple files at the same time. Pacman calls aria2c with the first url, waits for it to finish, then calls aria2c with the second etc...
    If you want to download multiple packages simultaneously, see http://xyne.archlinux.ca/projects/pacman2aria2/

  • Download multiple files with 1 HttpURLConnection

    Hi,
    We have an application that downloads small text files (< 2 Kb) from a webserver. These files are downloaded 1 by 1 when needed. We open a HttpURLConnection, download 1 file and close the connection immediately afterwards. This is done for each file and hence produces a significant overhead.
    For performance reasons (both client and server side), we would like to open a connection to the webserver once, download a number of files and then close the connection.
    Currently, our code roughly looks like:
    InputStream is;
    HttpURLConnection con;
    int resp;
    try {
        URL url = new URL(location);
        con = (HttpURLConnection)url.openConnection();
        resp=con.getResponseCode();
        if(resp==HttpURLConnection.HTTP_OK) {
            is = con.getInputStream();
            // ... read data from the InputStream
            is.close();
    } catch (MalformedURLException murle) {
        murle.printStackTrace();
    } catch (IOException ioe) {
        ioe.printStackTrace();
    }Is it even possible to download multiple files from a web server using a HttpURLConnection? If so, how? :-)
    Please note that the solution should be compliant with J2SE 1.1, since we are writing an MHP application!
    Thanks in advance...

    Seerix,
    You might be able to fudge the settings of the URL class :
    Class URLStreamHandler
    Method protected void setURL
    Sets the fields of the URL argument to the indicated values. Only classes derived from URLStreamHandler are supposed to be able to call the set method on a URL.
    But this is not the best way, as URLs are supposed to be constant.
    Your alternative, is to create a Socket, deal with the protocol requirements
    (i.e. HTTP GET, POST and so on) then you can request any number files
    on that same connection. The only thing that this saves is connection build up and tear down.
    You could also multi-thread your original code ....... Although that might
    only save you some network transit time.
    -Cludge

Maybe you are looking for

  • Running StoreFrontUI application gives error

    I downloaded the Fusion demo given at the following link: http://www.oracle.com/technetwork/developer-tools/jdev/index-095536.html The sample schema FOD has been setup successfully. The database version is 'Oracle Database 11g Enterprise Edition Rele

  • Photoshop CS2 and iPhoto

    I just got a iMac and when I try to set CS2 as editor in preferences of iPhoto: there is no choice allowing this. I only get choices of Aperture or window selections. No other program including CS2 which was transferred from my previous Mac is offere

  • Firefox crashes on opening with message "the applicationFirefox-bin has unexpectedly quit

    As stated above. It then tries to send a Talkback incident but this fails. I have tried to download a new version of Firefox but this gives an error message saying the disc image failed to mount and can't be opened. I am running an Apple Mac OSX 10.3

  • Viewing pdf's in Safari 3.1

    Is there a way to view pdf's before downloading in Safari 3.1? Right now one of the info services I use automatically sends the pdf as a download when I click on the pdf file on their website. In Windows, it allows for viewing first (with Adobe). I w

  • Book features in iDVD ?

    Hi all, I have spent all afternon looking at existing posts but could not find any satisfactory answer to my problem. I created a book in iphoto and sent it to iDVD. It is read as a movie there and the "slideshow" has very poor photo quality. The pho