* urgent * zips/flex Coldfusion downloads the zip before zip is finished!
Hi all
I'm unable to know what to do here.
I send pictures to flex coldfusion and use cfzip to create a zip of images by download.
I use fileRef.download to download the zip to the computer of the user file in actionscript.
The problem is that flex will allow the user to download the zip before it is finished compiling.
So if there are 68 images in the zip on the Web server, depending on the speed you select save location you could get only 42... or 29... etc.
I tried to put the download feature in the back of the remote object coldfusion Manager, but fileRef.download must be run by a click of the mouse for security reasons.
Here's the Manager click the button "download images".
Here's the flex below code:
public void clickHandler1(event:Event):void
{
imgStyleNumber = new ArrayCollection collection;
h = 0;
randomFileNum = Math.round (Math.random () *(99999-11111)) + 11111;
var t:int;
for (t = 0; t < HiResImageCollection.length; t ++)
{
imgStyleNumber.addItem ({ind:StyleNumberCollection [h] + "_" + ColorCollection [h] + pORiCollection [h]});
h = h + 1;
}
cfcquer4.getCartImages (HiResImageCollection, imgStyleNumber, randomFileNum);
downloadURL.url = " " http://localhost/Hib/ImagesTemp/DownloadedImages "+ randomFileNum +".zip"+"? "+ Math.Random ();
}
And here is the coldfusion cfc.
< cfproperty >
< cffunction = access "getCartImages" name = "remote" returntype = "Any" >
< cfargument name = "HiResImageCollection" required = "true" >
< cfargument name = "imgStyleNumber" required = "true" >
< cfargument name = "randomFileNum" required = "true" >
< cfset filepath = "C:\Inetpub\wwwroot\HIB\ImagesTemp\DownloadedImages" & #randomFileNum # & ".zip" >
< cfset i = 1 >
< cfloop index = array 'image' = #HiResImageCollection # >
< cfset q = toString(imgStyleNumber[#i#].ind) >
< cfset destpath = "C:\Inetpub\wwwroot\HIB\ImagesTemp\" & #q # & ".jpg" >
< cfimage action = "Write" source = destination #image # = #destpath # >
< cfzip action = "zip" source = file #destpath # = #filepath # > < / cfzip >
< cffile action = "delete file" = #destpath # >
< cfset i = #i # + 1 >
< / cfloop >
< / cffunction >
< / cfproperty >
Thank you for your help if necessary.
JK
JK, I thought you could just update the existing button. Using the same approach, we discussed (result managers, etc.). CF returns his view that the zip is made to change the label of the button and apply a new click handler. Then when that click event fires, call your method of download (you can listen to download complete and return the button back to its original state. Just a thought
Tags: ColdFusion
Similar Questions
-
URGENT! How to download the JRE 6.0 BB
Hi all
I want to download the JRE 6.0 BB, but I tried but not been able to find any link any link was broken. Please help me and give the link so I can download the JRE BB 6
Thank you
https://developer.BlackBerry.com/BBOS/Java/download/
Click
How to install additional versions of the BlackBerry SDK
read the text -
the creative cloud download app stalls before it can finish download
I have trouble downloading the cloud creative download app on my laptop. He begins to unpack, but then stalls and cannot complete. What prevents it?
Please read https://forums.adobe.com/thread/1499014
-try some steps such as changing browsers and disable your firewall
-also clear the cache of your browser if you start with a fresh browser
http://myleniumerrors.com/installation-and-licensing-problems/creative-cloud-error-codes-w ip.
http://helpx.Adobe.com/creative-cloud/KB/failed-install-creative-cloud-desktop.html
or
A chat session where an agent can remotely look inside your computer can help
Cloud creative support chat (all creative cloud customer service problems)
-
Help, about Firefox said I 9.0.1 but I always caution that I'm not using the current version.
Version information, see you in the About dialog box are not available directly to Web sites. Instead, they see your "useragent" text, which can be changed. In your case, it was changed to version 3.5.4 list. Sometimes, this is caused by an add-on.
Although this article is a bit old now, the procedure he described is still the best I know to fix this problem: Web sites or modules report wrongly incompatible browser | Troubleshooting | Firefox Help.
A little luck?
-
Am I duplicating music clip-zip when I download the entire file of MUSIC from Windows Media?
On my Zip Clip with a micro 32 card: using Windows Media, I downloaded my whole 'MUSIC' of the file to the device. Now that I've added more music in my Windows Media MUSIC file, download the entire file again for "updating" of new music, than i've got, or will I be duplicating what was there before?
It seems terribly painful to have to selectively add new music, checking back & comes to see what is already uploaded on the Clip-Zip.
If you use the 'sync' feature in WMP, it will add only what is new or changed in your music on your computer folder. Note that this method is a double-edged sword; It will also remove all the files that you may have removed the record music from your computer. This is not a good thing.
-
Errors downloading the ZIP file
I am submitting my first version BB for approval. I followed the instructions here:
https://developer.BlackBerry.com/DevZone/blackberryworld/parts_of_a_release_file.html
and created a ZIP file with the following content:
drwxr-xr-x 4 EnglishBundle_1.0.0
-rw - r - r-@ 1 releases.xml. / EnglishBundle_1.0.0:
3480 total
-rw - r - r-@ 1 Devices.txt
-rw - r - r-@ 1 MyApp.barI use the following version of the ZIP:
Copyright (c) 1990-2008 Info-ZIP - Type "zip"-L ""' for the software license.
It's Info-ZIP Zip 3.0 (5 July 2008).After I downloaded the ZIP file, I see the following errors
- Error opening unauthorized calls System.exit zip files!
- Invalid binary file (releases.xml6261300238015689064.xml)
- Invalid binary file (. _releases.xml581200695986280668.xml)
Interestingly, after I download the file, even if she complains that my xml file is not valid, I see a new beam of file at the bottom of the screen with my bundle name "EnglishBundle_1.0.0". The contents of my XML file is the following:
First version of my App
en_US
Folder bar that I work and am download installs fine on a Z10. What could I do it wrong?
For OS: Choose QNX as platform and then minimum OS 10.0
-
I download from github, it loads the name of my application in the app info section but in the description, it seems the description for the Hello world app.
I tried to download the zip file from directly and there still show the description of app world Hello and when I download it, it opens the app world Hello showing "camera ready."
I changed the XML and seems not to care about it.
What can be? why it does not show my application?
Hi, I solved the friend of the question. It was happening because I have download all the files generated by phonegap desktop app from my app to github. The solution is to download only the www folder and the config.xml file. Thank you for your time.
-
How to upgrade software components 7 element 703_patch.zip? Max
Hi waayne,
After downloading the ".zip" file, use the operating system or a utility such as WinZip or PKZIP to access the contents of the file.
-Extract the contents of the ZIP file.
-Double-click the EXE file to start the installation.
-You should get a message "Installed successfully" at the end of the installation.
-
Unable to download the zip file of Medrec Application code
Hello everyone,
I'm working on the Avitek Medical Records development Tutorials.I I try to download the zip from this link: http://edocs.bea.com/wls/docs100/medrec_tutorials/projectdir.html.I can't do it. Is there another place I can download this zip file.
Thank you
Mary D.Hello
Download from the following link
Link: [http://edocs.bea.com/wls/docs100/zip/medrec_tutorial.zip]Hope this helps :)
Kind regards.
-
Where I can download the ebook on flex?
I'm new to flex, where I can download the ebook on flex? Thank you.I'm not sure what you mean by eBook, but the use of Flex documentation is available from the Flex Resource Center help: http://www.adobe.com/support/documentation/en/flex/
They are available in PDF format and as part of a zip file that contains all of the content.
-
can we get the name of the image before you download the image?
Hi all
I have image download in my application.
Problem is that the user can download the image with the same name several times.
Can we get the name of the image before upload? I think that we cannot name before downloading.
I have here a way to get the name of the image before upload?
Chavigny hi...
In some cases of fileReferance you can get the name.
link will help you.
http://livedocs.Adobe.com/Flex/3/langref/Flash/NET/FileReference.html#propertySummary
Thank you
Vikram
-
It's never happened before. Ever since I downloaded the new version 31.1.1, Thunderbird adds automatically quotes in my email addresses in my address books, but only when I send an email in bulk for a lot of people. These quotes "" "show up on top of the same e-mail addresses in the"to"or"bcc"list of recipients, then on my server refuses to send. Please fix this. Sincerely, Doc
your address entries have a space either before they address book so they get cited. check the entries in the address book for an attack or of trailing white space
-
I put my download now ask before downloading. However, I suppose that the program gets a little scrap because he keeps asking and I keep saying 'NO '. Unfortunately, it takes on its own to download anyway. I like Firefox; However, I was informed by my school where I teach online courses, there are problems with Firefox 23 and our LMS. I DON'T want to have to keep installing Firefox 22 throughout the semester. How can I get the browser crazy to stop doing what he wants and to pay attention to my settings? Thank you
When you want to update to Firefox, you may need to change the
app.update.channel
value ofrelease
. -
Apple never shows the size of the file download updates? I have little download caps and would like to know the size of the file before downloading. Also to take advantage of free download period... 02:00 until 08:00 is there a way to plan downloads?
Yes. Informed of an update, select "install tonight". The downloads will be scheduled to occur at 02:00 local time.
Make sure that your MBA is connected to the power of this night there.
-
Why my personal hotspot does not connect to my iPhone6? I just used it on right Friday night before I downloaded the IOS 9.2 update... Anyone else having problems?
Maybe you are looking for
-
I want to install the audio beast after I put windows 7-profetional. How can I do? I have hp pavilion dv 6 with windoas 7 Home Edition.
-
I'm infected with adware or malware and my pages are directed
Original title: Malware and adware I'm infected with adware or malware and my pages are directed
-
FAT32 formatting for 500 GB Seagate external hard drive using Windows Vista
How to format FAT32 file system for 500 GB Seagate external hard drive using Windows Vista?
-
ThinkPad T43 (1872-CTO (Whitehorse)
Is there a graphics driver that works with Windows 7 for this T43 model?
-
The update of window does not work
The progress of the 'check for update' will not be completed after an hour and an hour. I tried the solutions offered on the internet, such as delete the C:\Windows\SoftwareDistribution folder and its contents and execution of WindowsUpdateDiagnostic