;

PDA

Click to See Complete Forum and Search --> : Flash 8 -> browse -> path to the file


Al_S_Asha
08-14-2005, 04:45 AM
flash.net.FileReferenceList - :thumbsup:
FileReference - :thumbsup:
but FileReference.name represents the name of the file on the local disk. :(
How can i get the path to the file? :confused: (4 ex, C:\Documents and Settings\admin\Desktop\IM000435.MPG)

FlashGuru
08-14-2005, 02:28 PM
You cannot get the full path to the file, as this would be a security risk.

However the source of the file is sent to the server, so you dont really need to know the file path to upload a file.

Al_S_Asha
08-15-2005, 10:16 AM
security risk?

old html form:

<form name="form2" enctype="multipart/form-data" method="post">
<input type="file" name="file2" value="">
<input type="reset" >
</form>

simple JavaScript

path_2_file=document.form2.file2.value;

path_2_file is the full path to the file. is this Security Risk?

i dont need to know the file path to upload a file.

i need to know the path to the file to open this file in Flash.


//-- something like this
fileUpload = new Object ();
fileRef = new flash.net.FileReference ();
fileRef.addListener (fileUpload);
onBrowse = function () {
// ask the user to choose a file to upload
fileRef.browse ();

//--- it's my dream
path_2_file=fileRef.give_me_path_2_file_please();
};
//--- browse - is the button
browse.addEventListener ('click', onBrowse);


//-- and that i really need

var my_sound:Sound = new Sound();
my_sound.loadSound(path_2_file, false);
my_sound.start();

flash mp3 player new generation.

FlashGuru
08-15-2005, 10:37 AM
yes, i know. But Macromedia considered it a security risk. I agree with you, but that is how it is.

Al_S_Asha
08-15-2005, 11:12 AM
may be full_path_to_the_file is hidden or nondocumented?
i really need full_path_to_the_file.
where is Flash 9 wish list? :)

FlashGuru
08-15-2005, 12:17 PM
Nope, its not undocumented or hidden, it just doesnt exist unfortuneatley.

Al_S_Asha
08-19-2005, 03:41 PM
bad news
my first 8ball disappointment

whispers
08-19-2005, 11:44 PM
can you use a batch file or something 3rd party...

or how about try using an environment variable %name% type of solution?

Al_S_Asha
08-23-2005, 03:55 PM
type of solution?
FileReference.copyIntoCache() Creates a copy of the file in the local Internet cache.
http://livedocs.macromedia.com/central/sdk/1_5/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Central_SDK&file=00000275.htm

gSOLO_01
08-24-2005, 12:30 PM
Central's File IO is a bit more featureful than the Player 8 implementation. I doubt you will see that level of access for the browser plug-in anytime in the near future.

FlashGuru
08-24-2005, 01:14 PM
Agreed. Central is an offline application and thus it needs to have that kind of capability. However, im not so sure it is needed with the web plugin, after all what can u do with the file path? you already have the filename.

Al_S_Asha
08-24-2005, 03:26 PM
what can i do with the file path?

path_2_file=FileReference.give_me_path_2_file_plea se();

var my_sound:Sound = new Sound();
my_sound.loadSound(path_2_file, false);
my_sound.start();

flash8_mp3_player

FlashGuru
08-24-2005, 03:30 PM
Nope, that would be a security breach aswell as the local machine is outside of the domain that the Flash Player is running in.

kelvinovitch
09-05-2005, 11:15 AM
I wanted to do something similar... Allow a user to select images from their harddrive and see them within flash before selecting whether to upload them or not. It didn't seem to be possible from my attempts so it may be a case of forgetting about the flash 8 feature and using a exe wrapping program (since this is for a standalone app)...

Unless anyone knows different?

Al_S_Asha
09-05-2005, 11:59 AM
it's possible (allow a user to select images from their harddrive and see them within flash before selecting whether to upload them or not), but will work only in IE (win).

martyg
10-03-2005, 07:55 AM
Hi, this is a major omission. I need it as well. I have files over 100 meg that I need to upload and would like to use sendAndLoad to Post them to a form for upload. I've been playing around to no avail.

Any ideas here.

Why 100 meg restriction??

Marty

rconceiver
04-10-2008, 01:40 PM
it's possible (allow a user to select images from their harddrive and see them within flash before selecting whether to upload them or not), but will work only in IE (win).


i would like to know about the solution...
please do let me know...

thanks in advance...
Edit by admin: no contact info permitted on the forum, thank you

whispers
04-10-2008, 03:42 PM
I thought the 100MB restriction was only if your PHP kept it as such?

have you done a search on FileReference upload limit?

and Im un-sure of how you can get a 'preview' of an image that is local on you hard drive to be displayed in your web app/site?

BEFORE uploading it?

MyFriendIsATaco
04-11-2008, 04:10 AM
The 100MB limit is NOT based on your PHP settings. It is a Flash restriction. Ever notice why YouTube has a 100MB limit?

whispers
04-11-2008, 09:25 AM
I dont hang out on 'YouTube.com'

well then I guess MANY others have posted incorrect information.. I have read several times that the limit is NOT valid.. and is usually restricted by (if using PHP) their PHP config file.

I have seen that FLASH has a limit.. but when reading up on this before..this is the info that has been passed on.

100MB is the limit tested (and I guess supported by Adobe/MM) however I have seen many posts where people claim to have done OVER that limit using PHP or CF.. just make sure the settings are not capping you.

Try it.. post back.

regardless that really isnt the focus of the last posters question..(I was just commenting on it) :)

again..."I" cant say for sure.. but what Ive read was that MM said 100 MB was the limit that they tested.. after that.. no clue.. if your PHP script is not limiting/capping you at 100 (or under even, as most do)