Pure ASP.NET Upload 2 AddOn Manual
Smart Image Processor
This section contains all different FAQs about Smart Image Processor.
For more FAQ's visit the DMXzone's FAQ section for Pure ASP Upload Add On Pack.
- Rename Without Insert?
- How to use form fields in the mail body
- Use form fields as From name and Email
- Dynamic upload renaming
Rename Without Insert?
Q: I have Pure ASP Upload and the Rename After Upload extension. When I don't use Insert Record Server Behavior - the rename does not work.
A: Well if you specify a redirect URL on the Pure ASP Upload - the Rename will never get executed. The way to solve this is leave the After Upload, Go to field empty.
Then go to the source, look up the "Rename Files After Upload" code block and insert a new code block after it for the redirect:
<%
'Redirect after upload and rename
If (CStr(Request.QueryString("GP_upload")) <> "")
Then
Response.Redirect "theNextPage.asp"
end if
%>
How to use form fields in the mail body
Q: I have made a form with the Pure ASP Upload feature and I want de values entered in the form (email and name of sender for example) to be added in the mail body. So when I use the mail Uploaded Files extendion the mail gets personalized.
A: In the mail body field you should enter something like:
Dear ##UploadFormRequest("FromName")##,
We are pleased...
so in the from and to fields use the <%=(UploadFormRequest("xxx"))%> and in the body ##UploadFormRequest("xxx")##
where xxx is the form field name.
Read also the FAQ about the from and to fields.
Use form fields as From name and Email
Q: I have made a form with the Pure ASP Upload feature and I want de values entered in the form (email and name of sender for example) to be added in the mail upload feature. The inserted email adres of the sender must be in de "from Email' field and the name of the sender in the "from name" field. How can i do this ?
A: Very easy. Just enter the form fields as:
<%=(UploadFormRequest("FromName"))%>
and
<%=(UploadFormRequest("FromEmail"))%>
Where "FromName" and "FromEmail" are the names of the corresponsing
form fields.
Dynamic upload renaming
Q: I am applying my upload script and I want to be able to tag the LastIdent value onto the front of my file name (from insert with ident extension), but I am having a hard time figuring out how to put that information in. Heres the line in particular:
RUF_renameMask = "<%=LastIdent%>##name##.##ext##"
So how would I keep the filename and extension, but put this sort of dynamic information in it?
A: Well unfortunately this is not possible... as you end up with the chicken and the egg problem.
As the filename will be stored in the database - the file has to be saved first, then renamed and them the latest value should be saved in the database.
But until you save it in the database you don't know the last ID of the record.
So maybe you should ask yourself if it is really wise to store the ID in the file name as well ...
If you just want to store another variable that it is no problem:
Then you just need to enter a valid vbscript expression like:
jobID & "##name##.##ext##"
or maybe if the JobID is coming from the QueryString:
Request.QueryString("jobID") & "##name##.##ext##"
or if you want to use other form field from the uploaded form (like a hidden
field) :
UploadFormRequest("jobID") & "##name##.##ext##"