I'm using Flex in Flash Player 10 on Windows, using FileReference to load a file into memory, as below.
My issue is that when a file is locked by Windows, my FileReference is not giving me any feedback that the file is inaccessible--it simply never dispatches any events after my calling load().
Does anyone have insight into how to tell...
I'm deploying a small application with Adobe Air. My application will do batch upload from filepath which stored in a text file.
For example, in a text file name "list.txt", there is a string "C:\myfiles\IMG_0001.JPG". Now I want to upload this image file, keep tracking of upload progress :-<
I want to use FileReference to get the upload...
The following code shows a button that allows you to select a file (should be an image) and display it into an image component. When I select an invalid image (e.g. unsupported image type, a word document), I get the following error:
"Error #2044: Unhandled IOErrorEvent:. text=Error #2124: Loaded file is an unknown type."
I know I can ...
I'm building a Flex app which requires me to download files.
I have the following code:
public function execute(event:CairngormEvent) : void
{
var evt:StemDownloadEvent = event as StemDownloadEvent;
var req:URLRequest = new URLRequest(evt.data.file_path);
var localRef:FileReference = new FileReference();
localRef.addEv...
Hello,
I am trying to call the browse() method of the FileReference class from JavaScript (a user clicks on a text that uses the ExternalInterface to call a method in Flash).
Unfortunately, I receive an error that tells me it has to be a direct action of the user (like clicking a button). I have searched through Google and realized thi...
Hi Gurus,
i am downloading tiff images from WAMP server using our Flex AIR client.
Using the following code for that.
public static function requestDownload(id:int, defaultName:String):void {
//POST params
var urlVars:URLVariables = new URLVariables();
urlVars.action = "download";
urlVars....
Let's say a user is starting to upload a file to the server via FileReference. What happens to that temporary file if the user cancels the upload or closes the browser? At what point is the server script called? Is the server script (in my case, ColdFusion) called only once the file has been successfully put on the server?
I'm trying to...
Hi,
I am working with a fileReference, however I'm having issues running on Safari on a MAC...
EDIT
The below example also doesnt work on Safari on a MAC...
http://www.permadi.com/blog/2010/06/flash-as3-using-filereference-to-load-files-example-for-flash-cs4-and-above/
#
The workflow on a PC runs as such:
1) Create file reference
...
Hello all,
I have a strange issue! I am trying to remove an event listener on a FileReference object by calling a function, but it seems not to be removed, and I do not understand why.
Here is the code:
private function clearFileUploadListeners(file:FileReference, index:String):void {
var dispatchEvent:Function = function(event:Ev...
Hello,
I am currently uploading files in ActionScript 3 using the upload() method of the FileReference class.
I built an uploader than can do simultaneous or parallel uploads, having a variable set the number of maximum uploads at a time.
I noticed that for Internet Explorer I could be uploading 10 or more files simultaneously, but Fi...
I am trying to allow download of a particular file that the user has generated (or will generate). If they try to download the file AFTER generating, the fileReference does not seem to create the new object (it downloads the old file).
Code is something like this:
private function downloadFile():void
{
var node:XML = XML(myTree.se...
Hello,
I would like to store a FileReference object somehow and load it when the SWF loads again.
I tried to use the SharedObject class but it does not seem to work. I suspect that what I want to do is not doable due to security issues (not using Adobe AIR), but I wanted to check.
Does anyone please know if there is anyway to store a ...
Hi all,
I need to upload a very large file to my server, through my Flex application, and I see that Flex Filereference upload() seems to be able to handle it. Does the upload() methods uploads a 'stream' to the servlet, or does it sends the whole ByteArray (As I understand it, the ByteArray will have the whole file contents, so a >1Gb...
In Action Script, FileReference.browse() is called.
I would like to send the chosen file to Javascript and convert it to File object, just like if I would press the Browse button of the <input type='file /> and got File object.
I need that to be able to display picture thumbnail like shown here.
Maybe instead of passing the whole obje...
Hello,
This might be an awkward question, I apologize in advance.
I made a program to upload files and it uses FileReference. I want to have an AIR version of this program, but allow to pick a whole folder. So far, I was able to get this behavior through AIR using AIRAliases.js in JavaScript.
I am able to create File objects but I won...
I need to call FileReference.save() after a web service call has completed, but this method has a restriction: "In Flash Player, 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 ...
Can I develop a Flash AS3 download swf that will let a user select a location on their hard drive to download files to and then start the download of multiple files (in the same way I can do with upload)? Or should I zip all the multiple files first and download zipped files to local disk.
My users will want to download potentially hun...
Hello!
I use a fileReference.browse() to select an image file from the harddrive.
How can I check the Width and Height of the selected image file please?
Thank you!
...
Hi there, I'm trying to copy my SQLite file that is used in my Air app to user's selected directory using
var fileSaveDest:FileReference = new FileReference();
fileSaveDest.save(dbWorkedFile,'Inventory.DB');
dbWorkedFile is a File
dbWorkedFile = File.documentsDirectory.resolvePath("Inventory.db");
I tried this but the saved file i...
Hi,
The following code is used in a component I name FileUpload.mxml which is used in two three different sections of the flex application.
private var uploadURL:URLRequest = new URLRequest;
private var file:FileReference = new FileReference;
private var media:MediaFacade;
public function browse():void
{
var uUrl:String=""; //...