| View previous topic :: View next topic |
| Author |
Message |
wiglaf
Joined: 17 Jun 2008 Posts: 4
|
Posted: Jun 17, 2008 9:54 pm Post subject: Post Output to ASP file? |
|
|
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 |
|
 |
admin Site Admin
Joined: 22 Mar 2006 Posts: 126
|
Posted: Jun 18, 2008 12:03 pm Post subject: Re: Post Output to ASP file? |
|
|
| 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 |
|
 |
wiglaf
Joined: 17 Jun 2008 Posts: 4
|
Posted: Jun 18, 2008 11:30 pm Post subject: |
|
|
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 |
|
 |
admin Site Admin
Joined: 22 Mar 2006 Posts: 126
|
Posted: Jun 20, 2008 11:39 am Post subject: |
|
|
| 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 |
|
 |
wiglaf
Joined: 17 Jun 2008 Posts: 4
|
Posted: Jun 20, 2008 7:53 pm Post subject: |
|
|
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 |
|
 |
wiglaf
Joined: 17 Jun 2008 Posts: 4
|
Posted: Jul 03, 2008 3:38 am Post subject: |
|
|
| Does any know the name of the array the script posts? |
|
| Back to top |
|
 |
|