Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- forms: _not_ uploading a file
- Thorsten Wienbarg
November 16, 2004, 6:52 pm
rate this thread
after doing some reading on this subject, I found lots of
information on how to actually avoid not uploading a file.
They don't tell me how to exclude the contents
of a file though.
I want to omit the upload and just retrieve the
location of a file (a sound file in this case), to be included
into a php-generated <embed> tag.
Thus, the sound would be played from a local file instead
of creating traffic.
Alright - how do I do this in an orderly fashion, preferably
one solution for all browsers?
Thx for your time, and if I did not find your specific web page
containing the solution - please tell me how I could have
found it so I can optimize my web search algorithm :)
Re: forms: _not_ uploading a file
> information on how to actually avoid not uploading a file.
> They don't tell me how to exclude the contents
> of a file though.
> I want to omit the upload and just retrieve the
> location of a file (a sound file in this case), to be included
> into a php-generated <embed> tag.
> Thus, the sound would be played from a local file instead
> of creating traffic.
You can't do that. Two problems:
1) Allowing http-sourced pages to access local files is a severe
security risk. Most browsers block this.
2) The file upload protocol does not transmit the local path of the
file - it appears on the input control for the user's benefit when
selecting the file. So the server never has access to it. This is
true for all browsers.
> Alright - how do I do this in an orderly fashion, preferably
> one solution for all browsers?
Oh, three problems:
3) Not all browsers support  <embed> - and you should use <object>
for that purpose anyway, and not all browsers/OSes/hardware that
support embed/object support sound. The second half is not so big
an issue in this particular case.
Anyway, why would you want to do this? If the user wants to play a
sound file on their local file system they already have ways to do
 Technically, all do, but not in the way you want.
- » Elementary code behaves differently in Mozilla & IE
- — Next thread in » HTML Authoring Forum