SibSoft Ltd.
Development Services
software products
 RegisterRegister    SearchSearch   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
EZYWebhost - Cheap XUpload & XFileSharing 100% campatible hosting

AJAX upload progress bar

File sharing script
Post Output to ASP file?

 
Post new topic   Reply to topic    SibSoft Ltd Forum Index -> XUpload
View previous topic :: View next topic  
Author Message
wiglaf



Joined: 17 Jun 2008
Posts: 4

PostPosted: Jun 17, 2008 9:54 pm    Post subject: Post Output to ASP file? Reply with quote

XUpload Pro

I know that I can redirect after download to another file. Can I redirect to an ASP file and have the post output array be captured by vbscript response.form or response("Filename") etc.?

I have attempted to do this for a while however it doesnt seem to allow for this.

Thanks.
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 22 Mar 2006
Posts: 126

PostPosted: Jun 18, 2008 12:03 pm    Post subject: Re: Post Output to ASP file? Reply with quote

wiglaf wrote:
XUpload Pro

I know that I can redirect after download to another file. Can I redirect to an ASP file and have the post output array be captured by vbscript response.form or response("Filename") etc.?

I have attempted to do this for a while however it doesnt seem to allow for this.

Thanks.


Hello,

no matter what you will use to grab POST request. ASP, PHP, Java, etc
Looks like you doing something wrong. Note that xupload sending array in POST request.
Back to top
View user's profile Send private message Send e-mail
wiglaf



Joined: 17 Jun 2008
Posts: 4

PostPosted: Jun 18, 2008 11:30 pm    Post subject: Reply with quote

Here is the sample code I am attempting to use:

Code:
DIM rFileName, rFileNameOrg, rFileSize, rFileStatus, rFileDesc, rFileMime

rFileName = request.form("file_name")
rFileNameOrg = request.form("file_name_orig")
rFileSize = request.form("file_size")
rFileStatus = request.form("file_status")
rFileDesc = request.form("file_descr")
rFileMime = request.form("file_mime")

response.write "FileName: " & rFileNameOrg & "<br>"
response.write "FileNameOrg: " & rFileName & "<br>"
response.write "FileSize: " & rFileSize & "<br>"
response.write "FileStatus: " & rFileStatus & "<br>"
response.write "FileDesc: " & rFileDesc & "<br>"
response.write "FileMime: " & rFileMime & "<br>"


All ll of the values return blank or null values. Can you provide some sample code?

Thanks.
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 22 Mar 2006
Posts: 126

PostPosted: Jun 20, 2008 11:39 am    Post subject: Reply with quote

wiglaf wrote:
Here is the sample code I am attempting to use:

Code:
DIM rFileName, rFileNameOrg, rFileSize, rFileStatus, rFileDesc, rFileMime

rFileName = request.form("file_name")
rFileNameOrg = request.form("file_name_orig")
rFileSize = request.form("file_size")
rFileStatus = request.form("file_status")
rFileDesc = request.form("file_descr")
rFileMime = request.form("file_mime")

response.write "FileName: " & rFileNameOrg & "<br>"
response.write "FileNameOrg: " & rFileName & "<br>"
response.write "FileSize: " & rFileSize & "<br>"
response.write "FileStatus: " & rFileStatus & "<br>"
response.write "FileDesc: " & rFileDesc & "<br>"
response.write "FileMime: " & rFileMime & "<br>"


All ll of the values return blank or null values. Can you provide some sample code?

Thanks.


As I said, you shold access this post request as array (look at post.php or post.cgi how they doing that).
Not sure how to deal with POST arrays in VB. But I found this HOWTO: http://blogs.msdn.com/david.wang/archive/2006/07/04/HOWTO-Convert-between-JScript-Array-and-VB-Safe-Array.aspx

I hope that will help
Back to top
View user's profile Send private message Send e-mail
wiglaf



Joined: 17 Jun 2008
Posts: 4

PostPosted: Jun 20, 2008 7:53 pm    Post subject: Reply with quote

I am making progress and appreciate your help.

VB requires a name of the post request field. I looked in the upload.cgi file and found the name of the field listed as: $_\[]

Here is the code:
Code:
for my $f (@files)
   {
       my @file_fields = qw(file_name file_name_orig file_status file_size file_descr file_mime);
       print"<textarea name='$_\[]'>$f->{$_}</textarea>" for @file_fields;
   }
   print"<textarea name='$_->{name}'>$_->{value}</textarea>" for @har;
   print"</Form><Script>document.location='javascript:false';document.F1.submit();</Script></BODY></HTML>";
   exit;
}


How does the field name appear when the html is built?
Example, what would be the ArrayName value?:
Code:
<textarea name="ArrayName"></textarea>


Thanks,
Back to top
View user's profile Send private message
wiglaf



Joined: 17 Jun 2008
Posts: 4

PostPosted: Jul 03, 2008 3:38 am    Post subject: Reply with quote

Does any know the name of the array the script posts?
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
Page 1 of 1

 
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