This topic is locked

file uploads last issue (i hope)

11/14/2011 6:58:39 PM
ASPRunnerPro General questions
G
georgeb author

i have a form report_add.asp, one of the fields is RecordNumber

it also has the child form (documents_add.asp) displayed on the bottom of the report_add page. this child form is a file upload object.
in the before record add of the parent form i have

--------------

Dim fso, f, RequestDirectory

RequestDirectory=server.MapPath(".") & "/aiupload/" & values("RecordNumber")

Set fso = CreateObject("Scripting.FileSystemObject")

If not fso.FolderExists(RequestDirectory) Then

set f=fso.CreateFolder(RequestDirectory)

end if

----------------

so i fill the parent form and click browse on the child add the file and....

the sub directory is created and the selected file in the child form is uploaded BUT...

the selected file is uploaded to the directory selected in the edit as Upload folder property.

how do i dynamically modify the child uplod directory path?

I don't see a session variable listed in the docs for this

TIA

GAB

Sergey Kornilov admin 11/14/2011

Please check this article that explains how this can be done:

http://xlinesoft.com/asprunnerpro/docs/upload_files_to_usersfolders.htm
If would make sense to save values("RecordNumber") in the session variable so you can use it in other events.