NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Niels Larsen on May 15, 2012, 12:20:10 AM

Title: Multi upload
Post 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
Title: Re: Multi upload
Post by: Niels Larsen on May 23, 2012, 04:29:38 AM
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?

Title: Re: Multi upload
Post by: Bruce on May 23, 2012, 05:44:00 AM
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
Title: Re: Multi upload
Post by: Bruce on May 23, 2012, 05:45:05 AM
>> 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
Title: Re: Multi upload
Post by: terryd on May 23, 2012, 05:59:08 AM
Hi Bruce
When will 6.32 be available?
Title: Re: Multi upload
Post by: Niels Larsen on May 23, 2012, 06:55:32 AM
Thanks Bruce. I think that'll do the trick.
/Niels
Title: Re: Multi upload
Post by: Stu on June 27, 2012, 09:33:04 PM
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)?
Title: Re: Multi upload
Post by: Bruce on June 28, 2012, 12:27:14 AM
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
Title: Re: Multi upload
Post by: Stu on July 01, 2012, 06:01:55 PM
Thanks Bruce.