Forum Moderators: coopster & phranque

Message Too Old, No Replies

upload status

mod needed for upload script

         

token

12:08 am on Apr 8, 2002 (gmt 0)

10+ Year Member



I'm using a Perl upload script for my site which lists pdf files for download. When the upload button is hit, there is absolutely no feedback on the upload process, and people tend to hit the button again. I'd like to see something in the status bar, hopefully showing at least the time remaining, and percent of download. There is a variable available in the script to get the filesize, maybe it can be used in the mod--I am not a scripter, but it might be easy for someone who is. I can post the relevant parts of the script if someone can help me please!

Ken

sugarkane

12:00 pm on Apr 8, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not sure there's a simple way of doing this unfortunately - I don't think there's such a facility in the standard Perl upload module, which I'm guessing your script will be using. It could be done with a custom upload script, but I think you'd have to get right down into dealing with the HTTP protocol at the socket level...

If anyone knows any different please post!

brotherhood of LAN

12:32 pm on Apr 8, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



would a not saying something like "if you do not reach the confirmation page after X seconds pleasee click again"

as long as most people know where they stand they will be sensible about the button clicking

Im not so sure about teh perl, though Im playing with something called ASPsmartupload and using a frontpage extension (believe it or not) for the same process, it even has the option of a confirmation page...wow frontpage :)

token

2:56 pm on Apr 8, 2002 (gmt 0)

10+ Year Member



I wonder if there's a little javascript that will do it--that can be printed in the Perl script? I'll search around, but I still wouldn't know how to get it to work. I do have a bit of text saying "please click upload only once, a file of maximum size may take a few minutes on a 56k connection".

thanks,
Ken

volatilegx

5:14 pm on Apr 8, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Instead of having the button actually submit the form, have it execute a javascript function that checks for a true or false value. Once the page loads, the value should be set to false. Once the function is executed, it checks to see if the value is false. If so, the form is submitted and the value is set to true. If true, an alert message appears telling the user to wait patiently and the form is not submitted.

token

4:57 pm on Apr 9, 2002 (gmt 0)

10+ Year Member



volatilegx, I think I know what you're saying, but not sure it's what I need. Or maybe it is, after I study up on Javascript some more. ;-) At the least, I just need a message in the status bar of the browser, saying something like "file being uploaded" and "please wait"--ideally it would be more intelligent than that by giving the actual progress of the upload,but I couldn't find such a javascript. I found a simple scrolling text script for the status bar, that would do for now. I just can't get it to work yet, surely it's just a matter of syntax, Does this look right to anyone?

<input type="submit" value="Upload"><onClick="scrollit(100)">

"scrollit" being the name of the javascript, which I pasted into the html just after the body tag. That was the upload button at the bottom of the page. Then I tried it in the ACTION event code, towards the top in the html:

<form enctype="multipart/form-data" action="$GalleryCgi" method="POST" name="FORM"> <input type="hidden"
name="func" value="upload"><onClick="scrollit(100)">

Maybe there's a better forum for getting beginner's help on javascript, I hope I'm not out of line here. But I've looked at many upload scripts, most all have the same problem--lack of upload feedback , and I thought this would be of general interest.
I've seen one script that has a really neat feedback scheme--it's a php script called "Gallery", and when uploading images, you get a little popup window with little graphic arrows moving from one computer to another. Maybe I'll get that to work someday.
Anyway, if someone can correct my syntax, I'd appreciate it.

thanks,

Ken

lak12

11:01 am on Apr 14, 2002 (gmt 0)

10+ Year Member



Hello there!
What I do is post a small message right next to submit button - "Wait until your file upload finished".
Depending on a connection speed of the client and the size of the uploaded file upload time may vary drammatically!

No Java will help agaist stupidity. And what if I have Java turned off??? Did you ever consider that many people have it off?
In my opinion program should not depend on OS and/or client resources! Why should your visitors care about your programming preferenses? Java - no Java it should work 100%!

I have no problem on my sites where I let people upload files 2Mb in sizes (images) and then I resize them to the Web viewable format with all kind of error checking (and correcting on-the-fly).
Visitors can click on the "Submit" button to death and there will be no harm to the system or server programs. I use cgi-lib.pl for uploading and other things and it works great! It gives all the variables I need (file name, MIME type) and it has no bugs I can complain about.

Well, that's just my thought :-))
Regards.
Mark.

william_dw

1:27 am on Apr 19, 2002 (gmt 0)

10+ Year Member



Hiya,
if you have access to COM components via perl (never use it myself, ASP & .NET, but COM is platform not language specific, as long as perl supports COM interaction) you should consider SoftArtisans FileUP, it has a progress indicator. Go here [demo.softartisans.com] and click "Server-Side Progress Indication" to see an example.

HTH,
Dw