Upload file from local PC to Server
Hello,
I have written a small flash application that will be run on a local machine. The purpose of the application is to constantly upload an XML file on a set interval. The XML file is rewritten by a third party software program. I am using flash as the upload method because of its light weight, multi-platform support, and that users can upload files to my server without the need for an ftp account.
Anyways, the XML uploads are working great. I would like to add an option to upload other files however, such as txt, html, and pdf. I have the script written already to detect when new files are written, and then it calls a function to upload the file. The problem I am having however is uploading the file. The best way I can think is to load the file into a string and send it to my PHP script to write to a file, much like the XML() function works. Is there something that will do this? I have looked into the new flash.net.FileResource() function, but that seems to require a user to select a file using a browse button. Is there a way I can hardcode the file that will be uploaded?
In short, I have all the dirty work done, I just need a way to send a file from a local machine to a php script so it can be written to a file on the server. Any help is greatly appreciated!
|