473,396 Members | 1,754 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,396 software developers and data experts.

Detecting a file upload

Si
Hi all.

I have a form that also allows an image to be uploaded.

<input type="file" name="Upload">

How can I detect if a file has been uploaded, example

if [upload has been made] then
Do thing A
else
Do thing B
end if

Thanks for any pointers
Jul 22 '05 #1
4 1173
Si wrote:
Hi all.

I have a form that also allows an image to be uploaded.

<input type="file" name="Upload">

How can I detect if a file has been uploaded, example

if [upload has been made] then
Do thing A
else
Do thing B
end if

Thanks for any pointers


Use FSO to check if the FileExists() prior

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
Jul 22 '05 #2
Si
Curt_C [MVP] wrote:
Si wrote:
I have a form that also allows an image to be uploaded.

<input type="file" name="Upload">

How can I detect if a file has been uploaded, example

if [upload has been made] then
Do thing A
else
Do thing B
end if
Use FSO to check if the FileExists() prior


Thanks for pointing me in the right direction.

How do I go about implementing this? The docs I have read all assume I
am looking for a file I know the name of. In this case, I have no file
name to check against as none would have been uploaded.

These 2 URL's seems to have information that is getting close
http://www.15seconds.com/issue/990401.htm
http://www.aspfaq.com/show.asp?id=2039
Jul 22 '05 #3
Si wrote:
Curt_C [MVP] wrote:
Si wrote:
I have a form that also allows an image to be uploaded.

<input type="file" name="Upload">

How can I detect if a file has been uploaded, example

if [upload has been made] then
Do thing A
else
Do thing B
end if


Use FSO to check if the FileExists() prior


Thanks for pointing me in the right direction.

How do I go about implementing this? The docs I have read all assume I
am looking for a file I know the name of. In this case, I have no file
name to check against as none would have been uploaded.

These 2 URL's seems to have information that is getting close
http://www.15seconds.com/issue/990401.htm
http://www.aspfaq.com/show.asp?id=2039


The filename is available in the Request collection I believe.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
Jul 22 '05 #4
Are you using a component to handle the upload ? Generally they have a Files
collection that you can check to see wether or not you have uploaded files..
:

Patrice

--

"Si" <simonATthedigitalvisionDOTcoDOTuk> a écrit dans le message de
news:uc****************@tk2msftngp13.phx.gbl...
Hi all.

I have a form that also allows an image to be uploaded.

<input type="file" name="Upload">

How can I detect if a file has been uploaded, example

if [upload has been made] then
Do thing A
else
Do thing B
end if

Thanks for any pointers

Jul 22 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

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...
4
by: darrel | last post by:
I have some INPUT TYPE=FILE fields on a page. There are four of them and I'd like to validate them. They can either be empty, or need a certain filename. This is what I am doing: if...
6
Jacotheron
by: Jacotheron | last post by:
I need a PHP script that can upload music files (mp3). The script is for a home project I have started a while ago. I have a MySQL database of all the music that I have. Other computers on the...
7
Curtis Rutland
by: Curtis Rutland | last post by:
Building A Silverlight (2.0) Multi-File Uploader All source code is C#. VB.NET source is coming soon. Note: This project requires Visual Studio 2008 SP1 or Visual Web Developer 2008 SP1 and...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.