Post Output to ASP file?

XUpload related questions

Moderator: admin

Message
Author
wiglaf
Posts: 4
Joined: Jun 17, 2008 9:50 pm

Post Output to ASP file?

#1 Postby wiglaf » Jun 17, 2008 9:54 pm

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.

admin
Site Admin
Posts: 1785
Joined: Mar 22, 2006 12:32 pm

Re: Post Output to ASP file?

#2 Postby admin » Jun 18, 2008 12:03 pm

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.

wiglaf
Posts: 4
Joined: Jun 17, 2008 9:50 pm

#3 Postby wiglaf » Jun 18, 2008 11:30 pm

Here is the sample code I am attempting to use:

Code: Select all

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.

admin
Site Admin
Posts: 1785
Joined: Mar 22, 2006 12:32 pm

#4 Postby admin » Jun 20, 2008 11:39 am

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

Code: Select all

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/archiv ... Array.aspx

I hope that will help

wiglaf
Posts: 4
Joined: Jun 17, 2008 9:50 pm

#5 Postby wiglaf » Jun 20, 2008 7:53 pm

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: Select all

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: Select all

<textarea name="ArrayName"></textarea>


Thanks,

wiglaf
Posts: 4
Joined: Jun 17, 2008 9:50 pm

#6 Postby wiglaf » Jul 03, 2008 3:38 am

Does any know the name of the array the script posts?


Return to “XUpload”

Who is online

Users browsing this forum: No registered users and 0 guests