Re: [Flashcoders] FileReference and Getting File Path
You'd get a preview without uploading, by accessing the file directly from the user's harddrive. However, this is not supported for security reasons. Basically, the answer is NO, with standard flash, you cannot read files from the user's harddrive without uploading them to the server first and reading them from there. -David R On 6/15/06, Mike Boutin <[EMAIL PROTECTED]> wrote: Oops :) Maybe im just dont undestand the problem because how can you show a preview of the users image without first uploading it to your server? Boots Geoffrey Williams wrote: > That's a Macromedia Central only feature. I doubt they're using Central, but > maybe ;) > > If you're working in a web page you can use a hidden file field and > communicate with it via ExternalInterface / getURL and javascript. > > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Mike Boutin > Sent: Thursday, June 15, 2006 1:56 PM > To: Flashcoders mailing list > Subject: Re: [Flashcoders] FileReference and Getting File Path > > Not sure if this will help, but maybe you can copy the image to the > users cache to display it. > > // make a working copy of a file on the user's disk > var fileRef = new FileReference(); > if (fileRef.browse(["Text Files", "*.txt"]) { > fileRef.copyIntoCache("backup-data.txt"); > var newFile = new FileReference(); > newFile.open("backup-data.txt"); > > // operate on new file > // ... > > } > > [EMAIL PROTECTED] wrote: >> Thanks for the reply. >> >> I can get the name, however it doesn't provide the path (i.e. > c:\images\image001.jpg) >> Mike Boutin mikeb at juicystudios.com >> Thu Jun 15 13:03:32 EDT 2006 Is it possible for you to > just grab the name after it is selected from >> the FileReference object? >> >> >> var listener:Object = new Object(); >> listener.onSelect = function(file:FileReference):Void { >> trace(file.name); >> }; >> >> >> Boots > > > > > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > > > ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] FileReference and Getting File Path
Oops :) Maybe im just dont undestand the problem because how can you show a preview of the users image without first uploading it to your server? Boots Geoffrey Williams wrote: That's a Macromedia Central only feature. I doubt they're using Central, but maybe ;) If you're working in a web page you can use a hidden file field and communicate with it via ExternalInterface / getURL and javascript. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Boutin Sent: Thursday, June 15, 2006 1:56 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] FileReference and Getting File Path Not sure if this will help, but maybe you can copy the image to the users cache to display it. // make a working copy of a file on the user's disk var fileRef = new FileReference(); if (fileRef.browse(["Text Files", "*.txt"]) { fileRef.copyIntoCache("backup-data.txt"); var newFile = new FileReference(); newFile.open("backup-data.txt"); // operate on new file // ... } [EMAIL PROTECTED] wrote: Thanks for the reply. I can get the name, however it doesn't provide the path (i.e. c:\images\image001.jpg) Mike Boutin mikeb at juicystudios.com Thu Jun 15 13:03:32 EDT 2006 Is it possible for you to just grab the name after it is selected from the FileReference object? var listener:Object = new Object(); listener.onSelect = function(file:FileReference):Void { trace(file.name); }; Boots ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] FileReference and Getting File Path
That's a Macromedia Central only feature. I doubt they're using Central, but maybe ;) If you're working in a web page you can use a hidden file field and communicate with it via ExternalInterface / getURL and javascript. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Boutin Sent: Thursday, June 15, 2006 1:56 PM To: Flashcoders mailing list Subject: Re: [Flashcoders] FileReference and Getting File Path Not sure if this will help, but maybe you can copy the image to the users cache to display it. // make a working copy of a file on the user's disk var fileRef = new FileReference(); if (fileRef.browse(["Text Files", "*.txt"]) { fileRef.copyIntoCache("backup-data.txt"); var newFile = new FileReference(); newFile.open("backup-data.txt"); // operate on new file // ... } [EMAIL PROTECTED] wrote: > Thanks for the reply. > > I can get the name, however it doesn't provide the path (i.e. c:\images\image001.jpg) > > Mike Boutin mikeb at juicystudios.com > Thu Jun 15 13:03:32 EDT 2006 Is it possible for you to just grab the name after it is selected from > the FileReference object? > > > var listener:Object = new Object(); > listener.onSelect = function(file:FileReference):Void { > trace(file.name); > }; > > > Boots ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] FileReference and Getting File Path
Not sure if this will help, but maybe you can copy the image to the users cache to display it. // make a working copy of a file on the user's disk var fileRef = new FileReference(); if (fileRef.browse(["Text Files", "*.txt"]) { fileRef.copyIntoCache("backup-data.txt"); var newFile = new FileReference(); newFile.open("backup-data.txt"); // operate on new file // ... } [EMAIL PROTECTED] wrote: Thanks for the reply. I can get the name, however it doesn't provide the path (i.e. c:\images\image001.jpg) Mike Boutin mikeb at juicystudios.com Thu Jun 15 13:03:32 EDT 2006 Is it possible for you to just grab the name after it is selected from the FileReference object? var listener:Object = new Object(); listener.onSelect = function(file:FileReference):Void { trace(file.name); }; Boots ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] FileReference and Getting File Path
Thanks for the reply. I can get the name, however it doesn't provide the path (i.e. c:\images\image001.jpg) Mike Boutin mikeb at juicystudios.com Thu Jun 15 13:03:32 EDT 2006 Is it possible for you to just grab the name after it is selected from the FileReference object? var listener:Object = new Object(); listener.onSelect = function(file:FileReference):Void { trace(file.name); }; Boots ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] FileReference and Getting File Path
Is it possible for you to just grab the name after it is selected from the FileReference object? var listener:Object = new Object(); listener.onSelect = function(file:FileReference):Void { trace(file.name); }; Boots [EMAIL PROTECTED] wrote: I am using the FileReference Class to upload images. Is there a way to get the path to the selected file? Ideally, I would like to preview the image before being uploaded and need the path. Thanks for any and all replies. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com . ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com