Stalled FileReference.download

How do you "restart" a stalled download.
I have a Flashdownloader that downloads files to users anf
sometime it stops for at vary long time, is there a way to timeout
a download so it will restart the download or cancel it?
Thanks
Frank

I am using the following code:
private var fileRefDownload:FileReference;
private function downloadFile():void
fileRefDownload = new FileReference();
var urlRequest:URLRequest = new
URLRequest(FILE_DOWNLOADLOAD_URL);
//FILE_DOWNLOAD_URL is the URL of the servlet to download
var uv:URLVariables = new URLVariables();
urlRequest.data = uv;
urlRequest.method = "POST";
uv.ID = 1;
fileRefDownload.download(urlRequest);
I tried the following events to retrieve the filename of the
file being downloaded.
DataEvent.DATA, Event.ACTIVATE, Event.CONNECT, Event.INIT,
Event.OPEN
I get the servlet name as the filename. Even the API document
says the same. What Event should I register, so that, I can get the
filename of the file being downloaded?

Similar Messages

  • FileReference#download() and filename question

    On the server side I set a HTTP header as
    Content-Disposition: attachment; filename=myfilename.txt
    Is it possible to get this information in Flex client? The FileReference#download() function gives a possibility for a name to set on the file browser, but I can't figure out how to get it from the server. By default, the function uses the remote URL.
    Any ideas?
    Thanks.

    Lawcats please see Install and update apps - https://helpx.adobe.com/creative-cloud/help/install-apps.html for information on how to install the Adobe Creative applications included with your membership.

  • Downloading Images - FileReference download error 2176

    Hi everyone.
    I'm trying to download some images but getting this error "Error #2176: Certain actions, such as those that display a pop-up window, may only be invoked upon user interaction, for example by a mouse click or button press."
    The trouble is, it IS running off a button click - just indirectly.
    I'm trying to design a good architecture for my program, so have the Application, a dataStore and some value objects, for example, a pricebook containing and array of products, each called PricebookVO and ProductVO.
    What I'm doing when the application loads is doing a database query with another API that gives me a pricebook and all of its products, and i populate the value objects.  Relationship is obviously  PricebookVO -< ProductVO.  I wanted to download the images for the products at the same time but it won't let me due to the error above, so what I have now is a button bar and when the user clicks a button an event is bubbled up to the Application which changes the page, but what also happens is it checks to see if the user has clicked the Products button and if it has, it tells the PricebookVO to tell each of its ProductVO's to download their image (from a URL that was saved from the query.
    Presumably the error im getting now is because the download is not directly summoned by a user event but by an indirect event (ie user pushes button, code calls code which tries to download the file).  How can I download the images and still maintain my architecture?
    Also, am I getting confused?  I want to get a file from a server and save them in an mx.controls.Image on the ProductVO record, do I use the FileReference.Download method or something else?  Because on further inspection it looks as though the download method is for downloading something to the local machine with a download dialog box?
    Thanks
    Steven

    Thanks for all your help Peter, its much appreciated.  I hate that useless feeling when learning a new language!
    So anyway, I was initially using image.source but thought to myself that's probably referencing the image from its server source which might be quite a hog, so wanted to store it myself, but if you say image.source does indeed handle the image itself and not just reference it from the source, thats good.
    My only remaining query is regarding how it is displaying.  I have a tileList which is rendering the images and it does work, however the images are loading on screen as I watch them, and if I scroll I then have to wait again whilst the images load.  If I then scroll back to the previuos part of the screen, where the images had previously already loaded, they have disappeared again and I once again have to wait for them to load.
    I know normally you'd embed them, but dont see how thats possible with the way I'm having to load them from the server?
    I have a method in my datastore like this:
    public function getProds():ArrayCollection{
    var imgs : ArrayCollection = new ArrayCollection();
    for each (var pb : PricebookVO in pricebooks){
      pb.getProdCount();
      for each (var p2 : ProductVO in pb.products){
       imgs.addItem(p2);
    return imgs;
    and in my products page:
    <mx:TileList>
      <mx:width>100%</mx:width>
      <mx:height>100%</mx:height>
      <mx:itemRenderer>components.Thumbnail</mx:itemRenderer>
      <mx:dataProvider>{DataStore.getInstance().getProds()}</mx:dataProvider>
    </mx:TileList>
    components.Thumbmail is
    <mx:Image>
      <mx:width>100</mx:width>
      <mx:height>75</mx:height>
      <mx:source>{this.data.image.source}</mx:source>
      <mx:toolTip>{this.data.prodCode}</mx:toolTip>
    </mx:Image>
    So, how can I stop the tilelist from having to constantly reload the images?  I get the impression that the solution might end up using a lot of memory to store the images somehow, so advice on the best way to do this is appreciated.
    Thanks!

  • Download (método FileReference.download)

    Hello!
    I am writing from Colombia, so I hope forgive me for my
    English so basic and aid translator.
    My question is this:
    I need to use the method: download (FileReference.download
    method)
    to be updated a number of flv I have a computer but the
    disadvantage is that the customer asked me that was so hidden
    without participation of a user with keyboard or mouse, you can
    perform this task?
    Thanks

    you can't force a download on a user without their active
    participation (using some kind of interface device like a
    keyboard/mouse/joystick/etc).

  • FileReference.download Failing

    I'm trying to use FileReference.download for a user to
    download a file. (obviously)
    It's working just fine, for probably 99% of our users.
    However, for one user in particular, the "Save As..." dialog box
    never appears. Does anybody know of any firewall/anit-virus/other
    security settings that could block this? It's happening in FF 2.0
    and IE 6, with Flash Player 9.

    Have the one user use another machine in their location to
    see if it is consistent inside their network or the user's machine.
    Also have them right click over the app to be sure they have
    the correct version of the Flash player.

  • FileReference download location

    Hello,
    Is possible retrieve the location of a file downloaded with the FileReference.download() method? After the user receives the prompt to download and selects a location I would like to be able to retrieve that location.
    Thanks,
    Scott

    for a web-based app it only works in response to a user even like a mouse click or keyboard event. 
    When you use this method , consider the Flash Player security model:
    Loading operations are not allowed if the calling SWF file is in an untrusted local sandbox.
    The default behavior is to deny access between sandboxes. A website can enable access to a resource by adding a URL policy file.
    You can prevent a SWF file from using this method by setting the  allowNetworking parameter of the the object and embed tags in the HTML page that contains the SWF content.
    In Flash Player 10 and Flash Player 9 Update 5, you can only call this method successfully in response to a user event (for example, in an event handler for a mouse click or keypress event). Otherwise, calling this method results in Flash Player throwing an Error exception.

  • FileReference.download in linux

    Hi All
         I am developing an application to use in both linux(ubuntu) and windows.
         In that i am using FileReference.download to save the file locally in windows but this is not working in linux.
         Is there any other possibilities(method) to save the file locally in both linux and windows?
         Please someone help me..
    Regards
    Preethee L

    Hi Preethee,
    Can you post the code snippent used in the application for saving the file
    I have tried following code on my Linux box (Ubuntu 10.10) and its working fine. This saves the file in documents folder of the user machine
                    var f = new FileReference();
                    try {
                        f.download ( new URLRequest ( "http://servername/download.text" ), "foo.txt" );
                    catch (e:Error)
    thanks
    Ashish

  • Filereference download issue on some browsers

    Hi, Im having a filereference download issue which is turning
    out to be rather elusive. I have it working great on my comp in ie,
    however on my comp with firefox, or with any browser on my father's
    computer we get the file browser popup and when we hit "save"
    everything SEEMS to go OK but the file doesnt get downloaded. Weve
    checked and re-installed all the browsers / flash plugins, and
    nothing has changed. No error handelers get tripped, and Ive
    checked the scope issue. The following is the code Im using,
    published to flash 8 AS 2.
    import flash.net.FileReference;
    _root.vars.fileRef = new FileReference();
    _root.functions.getit = function(){
    _root.vars.fileRef.download("
    http://www.myURL.com/myList.csv",
    "myList.csv")
    Thanks for your help.

    an absolute path would be something like:
    www.yourdomain.com/subdirectory/yourfile.ext
    (looking at the op's original message, i see he used an
    http:// prefix which isn't going to work in any
    case.)
    a relative path from yourdomain's main directory would be:
    subdirectory/yourfile.ext

  • Stalled ICloud download on new iPhone 5,  64 GB.

    The Icloud download to my two day old Iphone 5, 64gb has stalled for 24 hours.
    However, I downloaded speed test during the stalled Icloud  download.
    The download time for speed test was 45secs. 
    The test showed 52.74 dnlwd, 10.06 upld and 17 ms ping. 
    Xfinity hi def tv is fast and excellent.  Beautiful video. 
    I am using the new Apple dual band router which is supported by the
    the Iphone 5.
    I have both the AT&amp;T LTE and the Apple Router 4g dual band WiFi enabled on
    my Iphone 5.   The Iphone five has version 6.0.1  installed.
    I believe this is an Apple server problem, even though some reports from Apple
    seem to indicate its Googles DNS server or a software/hardware problem with
    the Iphone 5. 
    Seems like a strange conclusion since everything seems to be working except the
    Icloud server.
    I have tried resetting notifications, Cell only, wifi only and privacy system services.
    I did shut down and restart several times.
    I did not try rebooting or reseting the internet setup.
    All to no avail.
    How can I restart the Icloud download?
    thanks,
    howie
    [email protected]
    Posting from the new Ipad one,  testing on my new Iphone 5.

    I have found a solution to the posting listed below:
    https://discussions.apple.com/message/20264128#20264128   Stalled Icloud Download.
    The download that stalled was from the App Store purchased database.   It may have been caused by one
    several problems. 
    One:  I tried to download all of my purchased apps at the same time,  which created a DOS type event on my Iphone.
    Two:  One of the apps downloaded was damaged and caused the stall.
    Solution:   I deleted all of the stalled apps on my Iphone.   And I am now downloading selected apps one at a
    time.   My apps database contains apps purchased for my Ipad.  I may not need all of them on my Iphone.
    The Iphone 5 64 GB is working ok with no anomalies.
    A super great improvement over my Blackberry Torch!!  
    THANKS MUCH APPLE FOR A JOB WELL DONE!!!!
    Howie.

  • Why doesn't AS3 FileReference Download Work in IE/FF (Works fine in Chrome)

    I am generating an Excel file with Java on the back-end and it seems to work just fine in Chrome but for whatever reason it doesn't in FF/IE. I have the very latest of Flash in each browser listed from this site: http://helpx.adobe.com/flash-player/kb/find-version-flash-player.html
    I'm sending XML to the server, it is generating the Excel and sending it to the Flash. I'm performing the export by doing the following:
    private var _fileRef:FileReference;
    private function exportReport(e:MouseEvent):void
        _fileRef = new FileReference();
        _fileRef.addEventListener(Event.COMPLETE, excelExportCompleteHandler);
        _fileRef.download(new URLRequest("exportReport"), "report.xlsx");
        function excelExportCompleteHandler(e:Event):void {
            trace('complete');
    There are no error messages from Java/Flash. The browse popup comes up and I save the file the same in IE/FF as I do in Chrome. the trace('complete') is executed every time in every browser but the file only shows up when using Chrome.
    I also searched my filesystem and found temporary internet file shortcuts with the name of the file I was trying to download so it's as if it started the download but didn't finish it for some reason. The location of those files is AppData\Roaming\Microsoft\Windows\Recent Items

    Definitely not a timeout, it takes < 5 seconds for the web service call to finish
    I can also copy and paste the request url with data into the browser and it will successfully download the report just through the browser which made me realize I could use javascript as a non-ideal workaround solution to this problem.
    I would still love to know why it was failing and if anyone has any ideas that would be great but for anyone else with the same issue as me here is the workaround I used:
    as3 code (I used URLVariables to encode the data because trying encodeURI or encodeURIComponent didn't encode ' or " which would cause errors when doing the ExternalInterface.call()
    var reportData:String = getReportXML().toString();
    var variables:URLVariables = new URLVariables();
    variables.q = reportData;
    //Substring at 2 to trim off the 'q=' portion
    reportData = variables.toString().substring(2);
    ExternalInterface.call("function() { return downloadExcelReport('"+reportData+"')}");
    javascript code (I used a hidden form because I needed to be able to perform a POST because the xml data I was passing was too large for a GET)
    <script type="text/javascript">
        function downloadExcelReport(reportData) {
            reportData = decodeURIComponent(reportData);
            window.open("about:blank", "newWindow");
            document.getElementById("reportData").value = reportData;
            document.getElementById("reportForm").submit();
    </script>
    <form id="reportForm" method="post" target="newWindow" action="<%=SERVER_PATH%>excelReport">
        <input type="hidden" name="solutionReportXml" id="reportData" value="">
    </form>

  • Creative Cloud Desktop application installer stalls at downloading

    Hi When I download and run CC installer (CreativeCloudSetup.exe) on Win8 It stalls at about 8% and will not download the files needed. 
    To clarify I can download the CreativeCloudSetup.exe just fine, but when I run it it stalls when trying to download files.    Here is what it says after sitting at about 8% for a minute or 2.
    I have tried to restart and re-download the file, as well as the suggestions as noted below:
    I will download the new CC installer from the llink below.
    https://creative.adobe.com/products/creative-cloud
    If the first install attempt fails I'll rename the Adobe OOBE folder (out-of-box experience) to OOBE.old, then will try the install again. {Adobe OOBE folder locations for my system are below. Likely yours are the same.}
    C:\Users\[User Name]\AppData\Local\Adobe\OOBE
    C:\Program Files (x86)\Common Files\Adobe\OOBE
    They didnt work. 
    Screenshot of error:

    Hi pillguy,
    Please let us know the network environment are you in?  Which operating system are you using?  Do you utilize a proxy server or a software firewall?.
    Please try the steps mentioned in the kb: http://helpx.adobe.com/creative-suite/kb/remote-server-responding-installing-aam.html / http://helpx.adobe.com/creative-suite/kb/error-update-server-repsonding-cs4.html .
    You may even try download using different internet connection if possible.
    Regards,
    Romit Sinha

  • Btn to Cancel FileReference download

    Hi, I can't figure out how to make a button cancel downloads
    started using FileReference. Below is the code that is used to
    start the download. If you could let me know the right code to put
    in the on(release) of my cancel button that would be great. I've
    spent so much time trying to figure this out, and I just can't get
    it. Thanks!
    import flash.net.FileReference;
    var listener
    bject = new Object();
    listener.onCancel = function(file:FileReference):Void {
    //the code for what to do when user hits cancel on dialogue
    box
    listener.onOpen = function(file:FileReference):Void {
    //etc etc these listeners go on
    };

    Sorry that I was not able to successfully provide an answer.
    As I said I use Windows, but I would have expected the functionality to be very similar with Linux.
    I am having difficulty understanding
    *exactly what it is that you are attempting to do,
    *and why you consider Firefox's behaviour to be anything other than as expected.
    Someone else may understand better, and it may help if you give a specific example.
    * explain what sort of material you are trying to download, eg computer programmes, video etc
    * what site you are using, with the name and the correct link
    * an example file you tried, again with name and link <br/>(it would help if you give examples of free publicly accessible sites and files)
    # explain what you did and what happened
    # explain what the expected behaviour was
    # explain why you think something is wrong
    There is always the possibility using specialist download managers but that is outside the scope of this forum.
    '''Did you read the information shown by the blue clickable links in my first message ?'''
    * specifically https://support.mozilla.com/en-US/kb/Downloads%20window#w_what-can-i-do-with-the-downloads-window
    Part of which is
    ''"Remove the file's entry: If you do not wish to keep a record of a particular download, simply right-click the file entry, then select Remove From List (This will remove the entry from the list; it will not delete the file itself). "''
    That also lists and explains: Pause, Cancel, Open the file, Open the file's folder, and Retry a download.

  • How can I cancel a stalled podcast download within the iPad?

    When downloading a podcast from iTunes to the iPad the download stalled. Now when I go to the iTunes store I have a notification icon on the download button indicating that there is a download waiting. However, the podcast is no longer available and I get an error when I try to download it. How do I cancel the download and clear the notification?

    Try this.
    •  Log out of your iTunes store account.  Go to Settings > Store > Sign Out Then press the Home button.
    • Then press and hold the Home and Sleep buttons simultaneously and don't release them when it brings up the Turn Off screen; keep holding them until the Apple logo appears.
    • After restart, the Waiting should be gone.
     Cheers, Tom

  • Adobe air on iOS - FileReference Download Error

    I guys,
    when I use the Download method of the FileReference class, everything works fine on Desktop and Android, but I get an error on iOS.
    This is the code:
    var req = new URLRequest(url);
    var localRef:FileReference = new FileReference();
    localRef.download(req);
    On iOS I'm getting an Alert:
    Download Error
    File downloads not supported.
    I already tried to NavigateToUrl() and it asks save the file in Dropbox or another App.
    How can I fix this error?
    Thanks!

    What are you intending to do with the downloaded file? Will it be used solely by the app, or you attempting to download some othe media (photo, video, music, etc.) to be referenced outside the app.
    If you want to do the former I think I can help...
    The later, I am not sure how to, or if you can, do.

  • Acrobat XI Pro stalls when downloading

    Acrobat XI Pro stalls out when downloading. I've tried 3 times. It goes about 27% (all 3 times) and then quits. I've been able to download all my other apps just fine. Any suggestions?

    Hi A62Printing,
    Please try downloading it via the direct download links available at http://prodesigntools.com/adobe-acrobat-xi-pro-standard-reader-direct-download-links.html
    Note : Make sure you follow the important instructions on the page before initiating the download.

Maybe you are looking for

  • I want to share my epson printer over the wifi

    I have a Apple mac and currently my Epson deskjet printer is connected to it via usb cable. My wife and I both have Windows XP laptops and I would like to know if it is possible to send word documents to the printer over the home wifi network. This w

  • Need help in creating fake headers in subreports

    I read in a previous topic to get page headers on subreports to work in a container report, you have to create 'fake report headers' in the subreports.  I need some guidance with how to do that.  A reply to the previous topic had a URL link to get to

  • Class not found error!!!

    Hello, I wrote a program that would read data from a file (present in one of my folders). I developed it as an applet and am able to see the result in appletviewer, but unable to see it in the browser(IE6-WIN2000). I did the HTMLConverter procedure a

  • CS6 for "Home use" or "small and medium business"?

    Hello,   I'm interested in purchasing Photoshop CS6. I'm self-employed and I need an installation only for one machine, but for commercial use. Do I need to buy Photoshop for "small and medium business" or will "Home use" be sufficient license-wise?

  • Bootcamp not working after hard drive transfer

    A problem with my bootcamp has occurred. Recently my Macbook Pro (2008 model w/ Leopard OS) broke, and I replaced it with a brand new Macbook Pro 15" (w/ Snow Leopard OS). I transferred all of the files from my old hard drive to my new hard drive, an