473,387 Members | 1,456 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 1591
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: R. Rajesh Jeba Anbiah | last post by:
Q: How should I handle file upload? A: File uploading requires HTML form of content type "multipart/form-data". The file content has to be POSTed/submitted via the form and once the file is...
5
by: Kevin Ollivier | last post by:
Hi all, I've come across a problem that has me stumped, and I thought I'd send a message to the gurus to see if this makes sense to anyone else. =) Basically, I'm trying to upload a series of...
1
by: Jonathan | last post by:
Hi everyone, I have a problem with the file uploading in Asp.Net and I have read a lot on forums on this but never found an answer. Here is the problem: I know Asp.Net maximum Length for...
13
by: Sky Sigal | last post by:
I have created an IHttpHandler that waits for uploads as attachments for a webmail interface, and saves it to a directory that is defined in config.xml. My question is the following: assuming...
5
by: Mark Milley | last post by:
Hi All - I'm an MCAD and I've got a real head-scratcher here. I've created a ASP.NET Web Application for a client that essentially is a wrapper for SQL Reporting Services (they wanted a...
7
by: grpmangr | last post by:
hi Is ther anyway i can automatically fill out forms and submit them thru java? supposing i hav a normal txt file that contains all data that needs to be filed out into the form, is there anyway...
2
by: Richard | last post by:
Hi, I want to have only one button to Upload file but i get Access denied error. Default.aspx.cs: protected void Page_Load(object sender, EventArgs e) { FileUpload1.Attributes.Add("onchange",...
1
by: wenqiang7 | last post by:
I am encountering a very strang problem with file uploading in my ASP.Net page. When we try to upload certain file, we'll get an error msg of "Cannot find server or DNS Error". We are running...
3
ganesanji
by: ganesanji | last post by:
hi all, I have written a php coding for uploading a file to a specific folder or location in server which is a Linux server. I think the coding for file uploaing is correct. But it does not...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.