Re: help with progress bar -test site

2004-01-18 Thread Gerry Creighton
On Jan 17, 2004, at 12:37 PM, zentara wrote:

On Sat, 17 Jan 2004 11:54:55 -0500, [EMAIL PROTECTED] (Gerry
Creighton) wrote:
So can you suggest where to add the form processing to the upload.cgi?
I'm good with Flash and actionscripting but am not totally in tune  
with
perl (yet).
The guy who wrote that megaupload progress bar script said that it can
be done but has yet to return my message on where to paste the form
processing code.
Thanks for the help!
Gerry
Well I have to give my email address to get the files...sorry.
That's a sure way to get spam.
If it isn't too big, you could post the cgi script you want to
paste it into here.
P.S. My email address I use here is just a spam bucket, don't
send anything there, because I won't get it.
You need a cgi script to generate the form, a plain form won't
do. Why do you need this special FormBuilder anyways?
You should use this as an opportunity to write your own
that's the only way to learn.


--
When life conspires against you, and no longer floats your boat,
Don't waste your time with crying, just get on your back and float.

Correct me if I'm wrong but this should be the form processing that I  
need. This should send the form info to me and to the person filling it  
out.
Let me know what's up.
Thanks alot!
Gerry

code
#Standard variables which must be in every form :
#email  -- it submitter email address
#Example for form:
#Your email address : input type=text name=emailbr
#Your name  : input type=text name=name
#if field written in format as input type=text name=name_val
#that mean what script will be generate error if field name_val empty.
#input type=hidden name=order value=name,email,url
#it define order of fields in email
#Configure script here:

#You must define = where uploaded files will be stored.
#1. unix/nt path to uploaded files directory (must be chmoded to 777)
#2. full url of uploaded files directory
$files_path=/u/web/mydomainname/uploads;
$files_url =http://www.mydomainname.com/uploads;;
#Which file extensions must support script?

@ext=(gif,jpg,jpeg,tif,tiff,zip,pdf,sit,psd,mp3,mov 
,mp4,avi,ppt,doc,ai,qxd,eps,ttf,pub,sea);

#Maximum size of one uploaded file?

$maxsize=1; # 100 000 bytes by default

#How much files can be uploaded? Name it as file1..file12 for example
$maxfiles=2;
#File must be allways uploaded with form or not?
#Specify 0 - if your form can be without file or 1 - if as minimum  
uploading
#			of one file is requied

$requpload=1;

#Mailing. Send emails to admin/user via smtp or sendmail? Set only one!

$sendmail=/usr/lib/sendmail;
$smtp=;
#Admin email address.

$admin_email='[EMAIL PROTECTED]';

#Enter list of your websites which can call this script.

@domains=('domainName.com','IPNumber');

#Enable autoresponder? If set to 1, script will be send email to  
submitter.

$autoresponder=1;

#Subject for autoresponder message

$asubject='Thank you for uploading your files!';

#Autoresponder message

#Do we need to save information about submitted files/submitter email
#in database? If yes - set to unix/nt path to file
$store=; #Example with db : $store=./emails.db;

#End of configuration section

#Process form
#$efrom - this address of form submitter
$recipient=$CGI{'recepient'};
if (!$recepient) {$recipient=$admin_email;}else{delete  
$CGI{'recipient'};}

@order=split(/\,/,$CGI{'order'}); #Order of form

#Process form after this images with urls.

$redirect=$CGI{'redirect'};
if ($redirect) {delete $CGI{'redirect'};}
$msg1=; #Form fields
$msg2=; #Files urls
$msg3=; #File name
if ($order[0]) {
delete $CGI{'order'};
foreach $item (@order) {$msg1.=$item : $CGI{$item}\n;}
}else{
foreach $key (sort keys %CGI) {
if ($key !~ /file/is) {$msg1.=$key : $CGI{$key}\n;}
}
}
foreach $fo (@fname) {
$msg2.=$files_url/$fo\n;
$msg3.=$filename $fo\n;
}
$vrb=qq~Hello!

Visitor from $ENV{'REMOTE_ADDR'} has submitted form and attached $total  
files.

-
Job Information :
$msg1
-
Uploaded files :
$msg2
Best Regards,
Your uploader script
~;
#Autoresponder message
$amessage=qq~
Hello!
Thanks for uploading your job. We have received your job and will  
contact you with any questions.
You submitted the following:
-
Job Information :
$msg1
-
Uploaded files :
$msg3

Best Regards,
$admin_email
~;
#Send forms and autoresponder message if need
#$sendmail, $smtp
sendmail($sendmail,$smtp,New form is  
submitted,$recipient,$efrom,$efrom,New form is submitted,$vrb,0);

if ($autoresponder) {
sendmail($sendmail,$smtp,$asubject,$efrom,$recipient,$recipient,$asubjec 
t,$amessage,0);
}

#Headers
if ($redirect) {
print Location: $redirect \n\n;
}else{
print Content-type:text/html \n\n;
print load_template(submit-ok.html);
}
exit

Re: help with progress bar -test site

2004-01-18 Thread Gerry Creighton
On Jan 18, 2004, at 10:44 AM, zentara wrote:

On Sat, 17 Jan 2004 22:09:12 -0500, [EMAIL PROTECTED] (Gerry
Creighton) wrote:
On Jan 17, 2004, at 12:37 PM, zentara wrote:

You need a cgi script to generate the form, a plain form won't
do. Why do you need this special FormBuilder anyways?
You should use this as an opportunity to write your own
that's the only way to learn.


Correct me if I'm wrong but this should be the form processing that I
need. This should send the form info to me and to the person filling 
it
out.
Let me know what's up.
Ok, that FormBuilder code is written in an old style, which is not easy
to use.
I see what you want to do, and I'll offer my suggestions.
The first problem is your FormBuilder code uses an old manual
parsing style, which is no longer used much. The mega-uploader
uses the more widely used CGI.pm methods.  So they are kind of
incompatible without alot of rewritting.
- removed code -
So there it's basically all done for you.
Now this maillist is for helping people learn Perl, it's not a free
coding service. So you should take what I've showed you, and
test it on a local server, until you get it right.
If you have more questions, post it along with the code you are
trying.
Happy coding.

Thanks...that helps alot and get's me on the right track. That is 
basically what I wanted to know...where to put form code in the 
upload.cgi.
Gerry

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response



Re: help with progress bar -test site

2004-01-17 Thread Gerry Creighton
On Jan 16, 2004, at 6:18 PM, zentara wrote:

On Fri, 16 Jan 2004 09:32:30 -0500, [EMAIL PROTECTED] (Zentara)
wrote:
Well that's disappointing. Well then how do they do it with the

megauploader: http://www.raditha.com/megaupload/perl.php

Ok I have it working for the most part. You can test it here at:
http://zentara.net/cgi-bin/upp/upload0.cgi
I had to cut the number of allowed uploads down to 1 file.
The reason: for multiple files, he just uploads it all into one
big postdata, and it needs to be broken up into the original files.
More trouble than I care to deal with right now.  Should be easy 
enough,
but I already made alot of changes just to get it working.

Anyways, the biggest things I did:
1. Put the javascript into the upload0.cgi file, instead of having it a
   separate script. It wouldn't work otherwise.
2. Did a copy to save the postdata to it's original filename.

3.  I limited my upload size to 100k...I don't want to burn up all
my monthly bandwidth.
If you want a copy of my files, they are at:
http://zentara.net/upp-uploader.tgz
I still think it's better just to run a javascript animation until the
upload completes, and then send a result page.

Cool... I forgot to tell you that I can only use the perl version 
because it allows bigger files to be uploaded.
Can't wait to check it out. Now...what about form processing? I am/was 
trying to marry that upload.cgi that you were tweaking with a nice 
uploader form found here: 
http://www.mycgiscripts.com/file-uploader.html
This one works great and does what I want except for the progress bar. 
I was able to add a variable so that I can send the info of what was in 
the form and the file uploaded to the client as well as me for proof of 
the upload.
My ultimate goal is to get the progress bar working with this form 
uploader.
Thanks for the help!
Gerry

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response



Re: help with progress bar

2004-01-15 Thread Gerry Creighton
On Jan 15, 2004, at 2:20 PM, Wiggins d Anconia wrote:


On Tue, 13 Jan 2004 22:38:18 -0500, [EMAIL PROTECTED] (Gerry
Creighton) wrote:

Well that's disappointing. Well then how do they do it with the  
Megaupload
script? That works great and isn't slow BUT it doesn't have form
processing. The guy who wrote it said that I can paste the form  
processing
script in his upload script but I don't know where to paste it. Any  
help
or suggestions on that would be appreciated.
Gerry

megauploader: http://www.raditha.com/megaupload/perl.php

Because they open a separate window which I was thinking of originally
(a frame would work too). Essentially anything that initiates a second
request could provide the progress bar, but it won't work to have the
script handling the upload also handling the generation of the progress
bar.  In other words the form opens a second request with some
identifying information about the upload, that second request is to a
script that checks for an upload based on the identifier. Once the
request has been spawned then the form continues its normal submission
aka the first request which actually performs the upload, meanwhile the
second request updates the status to indicate a completion rate.  At
least that is how I was thinking of doing it... Regardless there must  
be
two separate request/response channels, at least based on today's
browsers as they have to complete the request before handling the
response, which does make sense.

http://danconia.org

I know how it works but my problem is that the progress bar is supposed  
to be checking the status of a file in a particular location...how can  
I get this to work and to be reading the same file's size?
It works and that is obvious...I gave a link to a progress bar that  
DOES in fact work but I need form processing with that uploader.
Any hints on where I should place the form processing scripts?

Gerry

 
...
http://www.thespikeranch.com
Certified Macromedia Flash MX Designer
 
...

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response



help with progress bar

2004-01-13 Thread Gerry Creighton
Hi,
I have a situation where I want people to upload large files to my  
server after filling out a form with several fields. I have an uploader  
form that works great in processing the form, uploading the file and  
sending me the form results as well as a copy to the person who filled  
out the form.
What I need is a progress bar so that the visitor isn't looking at a  
page that looks stalled out. I have often had people close the window  
which cancels the upload.
I am using a copy of the uploader from here:  
http://www.mycgiscripts.com/file-uploader.html
I found a progress bar that works but I can't integrate it with the  
form (mentioned above) that I am using.
The progess bar can be found here:  
http://www.raditha.com/megaupload/perl.php

I am trying to find out how to replace the variables or put them in the  
proper place to have the progress bar check the file being uploaded.  
I'm not shy towards cgiI have already altered the form so that the  
visitor gets a detailed response which is different than what is  
originally built in to the uploader form.
It doesn't seem to be checking the proper file location OR looking for  
the proper file name or session ID. I'm sure that I'm close but not  
close enough.

Thanks for any help!

Gerry

 
...
http://www.thespikeranch.com
Certified Macromedia Flash MX Designer
 
...

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/ http://learn.perl.org/first-response