470,855 Members | 1,143 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,855 developers. It's quick & easy.

forms: _not_ uploading a file

Hi there,

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 :)
Jul 23 '05 #1
1 1522
"Thorsten Wienbarg" <th***************@gmx.de> writes:
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.
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 [1] <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
that.

[1] Technically, all do, but not in the way you want.

--
Chris
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

9 posts views Thread by R. Rajesh Jeba Anbiah | last post: by
5 posts views Thread by Kevin Ollivier | last post: by
1 post views Thread by Jonathan | last post: by
7 posts views Thread by grpmangr | last post: by
2 posts views Thread by Richard | last post: by
1 post views Thread by wenqiang7 | last post: by
ganesanji
3 posts views Thread by ganesanji | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.