Forums

ASP

This topic is locked

add to querry string for pure asp upload 2?

Posted 17 Sep 2007 18:56:14
1
has voted
17 Sep 2007 18:56:14 joyce joyce posted:
Hi!
I'd like to add the name of the file i am uploading to the redirect string. I am uploading a csv and in the redirect page I open it and read it's data into the db. So I need to have access to that file name in the redirect page.

oh and i am using puer asp upload 2.2

any ideas?
Thanks!
Franklin

Replies

Replied 18 Sep 2007 10:12:26
18 Sep 2007 10:12:26 Georgi Kralev replied:
Hi Franklin,

You have to put the redirect statement after the code Pure ASP Upload.

To do that:
1. Clear <b>Go To:</b> field in the upload dialog (or set pau_Redirect to empty string)
2. Put the redirect statement and add parameter to the string which is initialized with <b>UploadFormRequest("fileField"</b>

For example:
<i>
&lt;%
'*** Pure ASP File Upload 2.2.2
Dim GP_uploadAction,UploadQueryString
PureUploadSetup
If (CStr(Request.QueryString("GP_upload") &lt;&gt; "" Then
Dim pau_thePath,pau_Extensions,pau_Form,pau_Redirect,pau_storeType,pau_sizeLimit,pau_nameConflict,pau_requireUpload,pau_minWidth,pau_minHeight,pau_maxWidth,pau_maxHeight,pau_saveWidth,pau_saveHeight,pau_timeout,pau_progressBar,pau_progressWidth,pau_progressHeight
pau_thePath = """upload"""
pau_Extensions = "pdf"
pau_Form = "form1"
<b>pau_Redirect = ""</b>
pau_storeType = "file"
pau_sizeLimit = "3000"
pau_nameConflict = "over"
pau_requireUpload = "true"
pau_minWidth = ""
pau_minHeight = ""
pau_maxWidth = ""
pau_maxHeight = ""
pau_saveWidth = ""
pau_saveHeight = ""
pau_timeout = "600"
pau_progressBar = ""
pau_progressWidth = "300"
pau_progressHeight = "100"

Dim RequestBin, UploadRequest
CheckPureUploadVersion 2.22
ProcessUpload pau_thePath,pau_Extensions,pau_Redirect,pau_storeType,pau_sizeLimit,pau_nameConflict,pau_requireUpload,pau_minWidth,pau_minHeight,pau_maxWidth,pau_maxHeight,pau_saveWidth,pau_saveHeight,pau_timeout

<b>Response.Redirect("_successful_upload.asp?filename=" & UploadFormRequest("fileField")</b>
end if
%&gt;
</i>

<b>fileField</b> is the name of the input file field that is used for upload.

<b>Note:</b>
If you have Update or Insert Server behaviour after the code of Pure ASP Upload it will not be executed.
To use Update/Insert Server behaviour put the redirect statement after Update Insert code.

Regards,


Georgi Kralev

----------------------------------
Support - www.DMXzone.com
Replied 28 Sep 2007 18:54:04
28 Sep 2007 18:54:04 joyce joyce replied:
Thanks Georgi!

Reply to this topic