RegisterRegister    SearchSearch   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

AJAX upload progress bar

File sharing script

File mirror script

Newsletter script
write comment onto a txt file after upload is done
Goto page Previous  1, 2
 
Post new topic   Reply to topic    SibSoft Ltd Forum Index -> XUpload
View previous topic :: View next topic  
Author Message
PilgrimX182



Joined: 22 Mar 2006
Posts: 2106
Location: UFO Lab

PostPosted: Jun 06, 2007 8:46 am    Post subject: Reply with quote

Use this code instead:

Code:
print FILE join(',', map{"'$cg->param($_)'"} qw(comment name emailaddress) );


- this will put fields in single quotes.
Back to top
View user's profile Send private message Visit poster's website
drumcritic



Joined: 06 Apr 2007
Posts: 15

PostPosted: Jun 06, 2007 2:08 pm    Post subject: Reply with quote

um, when i use the line above, I get this in my text file:

'CGI=HASH(0x932cbdc)->param(comment)','CGI=HASH(0x932cbdc)->param(description)','CGI=HASH(0x932cbdc)->param(email)'
Back to top
View user's profile Send private message
PilgrimX182



Joined: 22 Mar 2006
Posts: 2106
Location: UFO Lab

PostPosted: Jun 07, 2007 5:18 am    Post subject: Reply with quote

Oh, then this one.

Code:
print FILE join(',', map{q{'}.$cg->param($_).q{'}} qw(comment name emailaddress) );
Back to top
View user's profile Send private message Visit poster's website
drumcritic



Joined: 06 Apr 2007
Posts: 15

PostPosted: Jun 09, 2007 2:09 pm    Post subject: Reply with quote

thanks a lot!
one more thing. When I try to upload 2 files of the same name, the second file name will change from "name" to "name2" which is fine. But the first text file that is created by "name" is overwritten by the text file created by "name2". is there any way that I can fix that?
Back to top
View user's profile Send private message
PilgrimX182



Joined: 22 Mar 2006
Posts: 2106
Location: UFO Lab

PostPosted: Jun 11, 2007 5:19 am    Post subject: Reply with quote

Replace your line in upload.cgi:

Code:
open(FILE,">$c->{target_dir}/$fn.txt");


with

Code:
open(FILE,">$c->{target_dir}/$fn$i.txt");
Back to top
View user's profile Send private message Visit poster's website
drumcritic



Joined: 06 Apr 2007
Posts: 15

PostPosted: Jun 11, 2007 1:45 pm    Post subject: Reply with quote

thank you sooo much!
Back to top
View user's profile Send private message
viiksi



Joined: 19 Aug 2010
Posts: 2

PostPosted: Aug 19, 2010 5:36 pm    Post subject: Reply with quote

I would like to get this same thing working on my Xuploader PRO.

I tried to add some of those lines you posted here but every time it just breaks it Wink

Any way to put a bit more code visible so i see exactly where to put those lines.

Idea in this works perfectly for my purpose.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SibSoft Ltd Forum Index -> XUpload All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2005 phpBB Group