Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

load text file externally from users computer

Status
Not open for further replies.

RussellDonders

Programmer
Jun 10, 2001
27
0
0
GB
Hi,

I have a situation whereby I need to give the user the ability to define a range of variables via a text file (it's a non trivial dataset so it's not an option to just have the user input these directly via a flash form).

Basically I'd like them to type in a text box a location on their local hard drive (ie c:/directory/myfile.txt) where the file sits and then load it in.

This works fine on my hard disk and even on CD (I need to distibute this project in 2 forms both on the web and on CD) - but on the web server it fails. I assume that this sort of path (c:/) is either nonsense on the server, or is really pointing to the servers C:/ drive instead of the users ?

Anyway I was hoping someone out there may have a method of being able to point to the users hard drive to load variables from a txt file.

Any other suggestions are welcome as well. I have considered having an upload facility so the file is put on the server but would prefer not to have to do this at this stage.

Thanks,

Russell

 
only work for the web if you stick in on a server.

you could write a simple server script however to upload the file from the usual dialog box then import that into flash but flash wont read a file off the users hard drive from the web on its own
 
Shared Local Object maybe? Like a 'super cookie', you could download the data into the Flash app via a normal LoadVars action then write the data to the harddrive by putting it in a SLO which would then be accessible everytime the user came back to the application.
 
Hi Wangbar,

The problem is that I can't use LoadVars to get/download the data if the file is on the users computer - or can I ? I am unable to find a way to do this.

I have no need for flash to write anything to the users computer, I just need to retrieve a large input data set from them.

Thanks for your help.

Russell
 
Sorry, misread your post. Bill's suggestion is probably the best way to go then - allow the upload of the textfile via PHP or similar then read back into Flash.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top