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

File upload to website and rezise at the same time

I have a VB ASP.Net application where the user can upload a file using the
FileUpload server control. I also want a thumbnail to be created for this
file. Unfortunately I can see no means to determine when the file upload is
complete so that I can use the MakeThumbnail function as part of the code.
My current workaround is to supply an addition button the users can click on
when they think the upload is done that will find the uploaded file and make
the thumbnail.

Is there a way to determine when the upload is complete?

Jan 25 '06 #1
5 1574
You shouldn't have to worry about this. I believe you have some kind of
problem making you think that the file is not uploaded yet but this is
likely not the problem you have...

What have you seen exactly ?

--
Patrice

"William LaMartin" <la******@tampabay.rr.com> a écrit dans le message de
news:eA*************@tk2msftngp13.phx.gbl...
I have a VB ASP.Net application where the user can upload a file using the
FileUpload server control. I also want a thumbnail to be created for this
file. Unfortunately I can see no means to determine when the file upload is complete so that I can use the MakeThumbnail function as part of the code.
My current workaround is to supply an addition button the users can click on when they think the upload is done that will find the uploaded file and make the thumbnail.

Is there a way to determine when the upload is complete?

Jan 25 '06 #2
The file gets uploaded. I just can't immediately follow the upload code
with a make
Thumbnail function since apparently the uploaded file is either not fully
loaded or listed in the file structure of the server at that time.

I think I have solved the problem, though, by adding the following code
right after the upload code.

Dim fi As New System.IO.FileInfo(Server.MapPath(".") & "\Photos\" &
FileUpload1.FileName)
Do While fi.Exists = False
'do nothing
Loop
"Patrice" <a@bc.c> wrote in message
news:Ov**************@TK2MSFTNGP11.phx.gbl...
You shouldn't have to worry about this. I believe you have some kind of
problem making you think that the file is not uploaded yet but this is
likely not the problem you have...

What have you seen exactly ?

--
Patrice

"William LaMartin" <la******@tampabay.rr.com> a écrit dans le message de
news:eA*************@tk2msftngp13.phx.gbl...
I have a VB ASP.Net application where the user can upload a file using
the
FileUpload server control. I also want a thumbnail to be created for
this
file. Unfortunately I can see no means to determine when the file upload

is
complete so that I can use the MakeThumbnail function as part of the
code.
My current workaround is to supply an addition button the users can click

on
when they think the upload is done that will find the uploaded file and

make
the thumbnail.

Is there a way to determine when the upload is complete?


Jan 25 '06 #3
Still don't know what you have seen exactly. An antivirus software could
also perhaps lock the file for a short period.

IMO this is not something normal. Though it works I would still investigate
a bit further...

--
Patrice

"William LaMartin" <la******@tampabay.rr.com> a écrit dans le message de
news:ei**************@TK2MSFTNGP14.phx.gbl...
The file gets uploaded. I just can't immediately follow the upload code
with a make
Thumbnail function since apparently the uploaded file is either not fully
loaded or listed in the file structure of the server at that time.

I think I have solved the problem, though, by adding the following code
right after the upload code.

Dim fi As New System.IO.FileInfo(Server.MapPath(".") & "\Photos\" &
FileUpload1.FileName)
Do While fi.Exists = False
'do nothing
Loop
"Patrice" <a@bc.c> wrote in message
news:Ov**************@TK2MSFTNGP11.phx.gbl...
You shouldn't have to worry about this. I believe you have some kind of
problem making you think that the file is not uploaded yet but this is
likely not the problem you have...

What have you seen exactly ?

--
Patrice

"William LaMartin" <la******@tampabay.rr.com> a écrit dans le message de
news:eA*************@tk2msftngp13.phx.gbl...
I have a VB ASP.Net application where the user can upload a file using
the
FileUpload server control. I also want a thumbnail to be created for
this
file. Unfortunately I can see no means to determine when the file
upload is
complete so that I can use the MakeThumbnail function as part of the
code.
My current workaround is to supply an addition button the users can
click on
when they think the upload is done that will find the uploaded file and

make
the thumbnail.

Is there a way to determine when the upload is complete?



Jan 25 '06 #4
It appears to me that VB does not wait for the FileUpload server control to
finish saving the file to the server hard drive before proceeding to execute
the next line of code. And if that next line of code requires access to the
uploaded file you run into trouble--unless you wait until you know that the
file exists, which is why checking for its existence before proceeding
appears to solve the problem.
"Patrice" <a@bc.c> wrote in message
news:eD**************@TK2MSFTNGP10.phx.gbl...
Still don't know what you have seen exactly. An antivirus software could
also perhaps lock the file for a short period.

IMO this is not something normal. Though it works I would still
investigate
a bit further...

--
Patrice

"William LaMartin" <la******@tampabay.rr.com> a écrit dans le message de
news:ei**************@TK2MSFTNGP14.phx.gbl...
The file gets uploaded. I just can't immediately follow the upload code
with a make
Thumbnail function since apparently the uploaded file is either not fully
loaded or listed in the file structure of the server at that time.

I think I have solved the problem, though, by adding the following code
right after the upload code.

Dim fi As New System.IO.FileInfo(Server.MapPath(".") & "\Photos\" &
FileUpload1.FileName)
Do While fi.Exists = False
'do nothing
Loop
"Patrice" <a@bc.c> wrote in message
news:Ov**************@TK2MSFTNGP11.phx.gbl...
> You shouldn't have to worry about this. I believe you have some kind of
> problem making you think that the file is not uploaded yet but this is
> likely not the problem you have...
>
> What have you seen exactly ?
>
> --
> Patrice
>
> "William LaMartin" <la******@tampabay.rr.com> a écrit dans le message
> de
> news:eA*************@tk2msftngp13.phx.gbl...
>> I have a VB ASP.Net application where the user can upload a file using
>> the
>> FileUpload server control. I also want a thumbnail to be created for
>> this
>> file. Unfortunately I can see no means to determine when the file upload > is
>> complete so that I can use the MakeThumbnail function as part of the
>> code.
>> My current workaround is to supply an addition button the users can click > on
>> when they think the upload is done that will find the uploaded file
>> and
> make
>> the thumbnail.
>>
>> Is there a way to determine when the upload is complete?
>>
>>
>>
>
>



Jan 25 '06 #5
I still don't know what was the message you had and I would have been
interested in seeing some code. Execution is supposed to be sequential.
I'll give this a try as soon as I have 2.0 handy.

--
Patrice

"William LaMartin" <la******@tampabay.rr.com> a écrit dans le message de
news:uX*************@TK2MSFTNGP12.phx.gbl...
It appears to me that VB does not wait for the FileUpload server control to finish saving the file to the server hard drive before proceeding to execute the next line of code. And if that next line of code requires access to the uploaded file you run into trouble--unless you wait until you know that the file exists, which is why checking for its existence before proceeding
appears to solve the problem.
"Patrice" <a@bc.c> wrote in message
news:eD**************@TK2MSFTNGP10.phx.gbl...
Still don't know what you have seen exactly. An antivirus software could
also perhaps lock the file for a short period.

IMO this is not something normal. Though it works I would still
investigate
a bit further...

--
Patrice

"William LaMartin" <la******@tampabay.rr.com> a écrit dans le message de
news:ei**************@TK2MSFTNGP14.phx.gbl...
The file gets uploaded. I just can't immediately follow the upload code with a make
Thumbnail function since apparently the uploaded file is either not fully loaded or listed in the file structure of the server at that time.

I think I have solved the problem, though, by adding the following code
right after the upload code.

Dim fi As New System.IO.FileInfo(Server.MapPath(".") & "\Photos\" &
FileUpload1.FileName)
Do While fi.Exists = False
'do nothing
Loop
"Patrice" <a@bc.c> wrote in message
news:Ov**************@TK2MSFTNGP11.phx.gbl...
> You shouldn't have to worry about this. I believe you have some kind of > problem making you think that the file is not uploaded yet but this is > likely not the problem you have...
>
> What have you seen exactly ?
>
> --
> Patrice
>
> "William LaMartin" <la******@tampabay.rr.com> a écrit dans le message
> de
> news:eA*************@tk2msftngp13.phx.gbl...
>> I have a VB ASP.Net application where the user can upload a file using >> the
>> FileUpload server control. I also want a thumbnail to be created for >> this
>> file. Unfortunately I can see no means to determine when the file

upload
> is
>> complete so that I can use the MakeThumbnail function as part of the
>> code.
>> My current workaround is to supply an addition button the users can

click
> on
>> when they think the upload is done that will find the uploaded file
>> and
> make
>> the thumbnail.
>>
>> Is there a way to determine when the upload is complete?
>>
>>
>>
>
>



Jan 26 '06 #6

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

Similar topics

5
by: Dave Smithz | last post by:
Hi There, I have a PHP script that sends an email with attachment and works great when provided the path to the file to send. However this file needs to be on the same server as the script. ...
20
by: CHIN | last post by:
Hi all.. here s my problem ( maybe some of you saw me on other groups, but i cant find the solution !! ) I have to upload a file to an external site, so, i made a .vbs file , that logins to...
4
by: Grant Harmeyer | last post by:
When I try to upload a file to a resource on my local webserver, my code catches an exception that a 405 error (method not supported) has occured on the server. I set the code up nearly exactly as...
3
by: Pitcairnia | last post by:
The basic purpose of the site is for authenticated users to post event listings, which often include photographs. The user is faced with a page where they can insert all of the information about...
2
by: Buddy Ackerman | last post by:
I'm have Windows 2000 Server and my website allows uploads of files (using <input type="file">) However I have some problems when a user trys to upload a large (>8MB) file. When the user submits...
2
by: hotflash | last post by:
Hi Master CroCrew, I found a good PURE ASP that will allow you to upload 10MB file to the server and the file contents such as Network, Author, Title, etc... will insert to MS Access at the same...
3
by: pozze | last post by:
Hi, I've just made the change from ASP to .net. I have a file (code below) that saves a user submitted file to a MS SQL 2005 database. It collects the file name, file size, file type, and lastly...
1
KevinADC
by: KevinADC | last post by:
Note: You may skip to the end of the article if all you want is the perl code. Introduction Many websites have a form or a link you can use to download a file. You click a form button or click...
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: 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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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.