SA-fileup dynamic paths to directories?

Results 1 to 2 of 2

Thread: SA-fileup dynamic paths to directories?

  1. #1
    Join Date
    Dec 1969

    Default SA-fileup dynamic paths to directories?

    SA-fileup dynamic paths to directories?<BR><BR>Is it possible to create a dynamic path using hidden fields of the refering form:<BR><BR>FORM ACTION="actionpage.asp" ENCTYPE="MULTIPART/FORM-DATA" METHOD="POST" <BR>INPUT TYPE="hidden" NAME="ItemNumber" value="77777"<BR>INPUT TYPE="hidden" NAME="Category" value="furniture"<BR>INPUT TYPE="FILE" NAME="FILE1"<BR>/form<BR><BR>of the action asp page:<BR><BR>Set upl = Server.CreateObject("SoftArtisans.FileUp")<BR>upl. Path = Server.Mappath ("/upl.form(Category)/images/"<BR>upl.SaveAs "upl.form(Itemnumber).jpg"<BR><BR>that is my attemp at asp, don&#039;t laugh to hard and fall out of your chair.<BR><BR>The upl.form(Category) and upl.form(Itemnumber).jpg would be a way to set the directory and file name using the form variables.<BR><BR>Any ideas are appreciated. Thanks ed jones<BR>

  2. #2
    Join Date
    Dec 1969

    Default Sort of...

    You&#039;ve just got to understand how to incorporate variables in your code. Anything surrounded by "double quotes" means that it&#039;s a chunk of plain old immutable text. If you want to incorporate this &#039;hard-coded&#039; text with the content of variables you need to concatenate them together using an & ampersand.<BR><BR>Set upl = Server.CreateObject("SoftArtisans.FileUp")<BR>upl. Path = Server.Mappath("/" & upl.form(Category) & "/images/")<BR>upl.SaveAs upl.form(Itemnumber) & ".jpg"<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts