473,405 Members | 2,404 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,405 software developers and data experts.

Progress bar in web-based ftp?

I've got an application that prompts the user to select a file from his
local computer, checks the user's selection, then sends the file via
<form name="clients" method="POST" action="upload"
enctype="multipart/form-data">

In the python code that receives the files I've got a section that does
the following:

if not os.path.isfile(filePath):
file(filePath, 'wb').write(str(form[name].value))
else:
print "File already exists - deleting"
os.unlink(filePath)
file(filePath, 'wb').write(str(form[name].value))

after error checking, etc.

My question is whether anyone has ideas as to how I could implement a
progress bar. When I send a large file this way it can take a long time,
and I'd like to be able to reassure the user that something really is
happening.
May 10 '06 #1
1 1843
CatDude wrote:
I've got an application that prompts the user to select a file from his
local computer, checks the user's selection, then sends the file via
<form name="clients" method="POST" action="upload"
enctype="multipart/form-data">

In the python code that receives the files I've got a section that does
the following:

if not os.path.isfile(filePath):
file(filePath, 'wb').write(str(form[name].value))
else:
print "File already exists - deleting"
os.unlink(filePath)
file(filePath, 'wb').write(str(form[name].value))

after error checking, etc.

My question is whether anyone has ideas as to how I could implement a
progress bar. When I send a large file this way it can take a long time,
and I'd like to be able to reassure the user that something really is
happening.

Turns out that this is more difficult than you might think. The problem
is you must have the client communicate with the server in some way and
have the server know what the progress is at any point. HTML POST
action=upload doesn't give you anything to work with to provide such
information to the client's browser (if it does I'm not aware of it
anyway). It also would take something like JavaScript and XMLRPC on
the client to make the round trip to get updated progress information.

-Larry Bates
May 10 '06 #2

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

Similar topics

0
by: Brendan Smith | last post by:
There's a point in our ASP.NET application where we fire off a web service asynchronously on post-back, then monitor the progress of the web service until it completes. While the service is...
10
by: Rob | last post by:
Hi all, Is it possible to do a progress bar of gauge bar in asp? If possible could someone show some sample code on it. Many thanks, Rob
1
by: Elliott B. | last post by:
We have been asigned a project required by our parent company to have our sales people fill out a form before billing any order to our customers. Our main system runs a Progress db, that's where...
9
by: Popoxinhxan | last post by:
Dear experts, i want to develop an client application that consume the google search web service. In my MainForm i have a method to retrieve all the search result e.g. GetGoogleResults(). Now i...
3
by: Brian Birtle | last post by:
**** A CHALLENGE TO THE GURUS - refute the statement "It's impossible to build a file upload progress meter using ASP.NET" **** First person to prove me wrong gets "All Time .NET Programming GOD"...
2
by: randy1200 | last post by:
In SQL Reporting Services, there's a circular green progress bar. Looks just like the regular progress bar in the toolbar, except that it's a circle. It's perfect for when a Win Form client needs...
3
by: Ritesh Raj Sarraf | last post by:
Hi, I have a small application, written in Python, that uses threads. The application uses function foo() to download files from the web. As it reads data from the web server, it runs a progress...
2
by: Michael Jervis | last post by:
Hi, I'm writing a little application that scans a large number of media files for processing. The main application currently uses a backgroundworkerprocess to perform the scan. Each media...
1
by: daniel_xi | last post by:
Hi all, I am running a VS 2003 .NET project on my client machine (Win 2000 SP4, ..NET framework 1.1), running an ASP.NET application on a remote web server (Win 2000 Server, IIS 6.0, .NET...
1
by: BLUE | last post by:
I want to pass chunks of an xml file or an entire xml file to my WS. I'm surprised to see fro MSDN that no System.Xml class is serializable (XmlDocument, XmlElement and XmlNode): - I should use a...
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
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...
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.