NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Niels Larsen on May 15, 2012, 12:20:10 AM
-
Hi
I would like to use the multi upload - very nice feature.
How do I find out which files the user has uploaded? In my upload-var I only get one filename (Chrome). I can look in the "\ Upload" folder, but it will not work if two users upload at the same time.
Is there a way to change the upload folder to runtime?
Regards Niels
-
Am I really the only one who needs to change the upload directory for each session?
Or being able to read all file names from a multi-upload?
-
crap - I wrote this long reply, and the forum software threw it away on Posting.
Let me see if I remember it all;
a) you'll need build 6.32 or later
b) multi-file uploads are not supported by IE
c) in the "immediate validation" the list of files will be received as a ;|; separated list.
d) when the user clicks on Save each file will go through the HandleFile method.
e) the first file will be assigned to the fil:fieldname variable. (this is the p_name parameter in handle file.) Subsequent files will have a suffix on the end - eg fil:fieldname_2, fil:fieldname_3 and so on. (there is no fil:fieldname_1).
f) in the form you will need to manually save the additional fields (fil:fieldname_2 etc) in the Validaterecord routine. At this stage there is no automatic support for where these fields go.
Cheers
Bruce
-
>> Is there a way to change the upload folder to runtime?
yes, see the renameFile method in the WebHandler procedure, in the FileUploads (26) example.
cheers
Bruce
-
Hi Bruce
When will 6.32 be available?
-
Thanks Bruce. I think that'll do the trick.
/Niels
-
Hey Bruce,
Just wondering where I can get a hold of the TOTAL files selected (it appears inside the <input> field, to the left of the upload button)?
-
no,
to figure out how many files there are though just work up through;
>> e) the first file will be assigned to the fil:fieldname variable. (this is the p_name parameter in handle file.) Subsequent files will have a suffix on the end - eg fil:fieldname_2, fil:fieldname_3 and so on. (there is no fil:fieldname_1).
until you get to a blank value.
cheers
Bruce
-
Thanks Bruce.