NetTalk Central

Author Topic: Multi upload  (Read 4929 times)

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 431
    • View Profile
    • Email
Multi upload
« 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

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 431
    • View Profile
    • Email
Re: Multi upload
« Reply #1 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?


Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Multi upload
« Reply #2 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

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Multi upload
« Reply #3 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

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: Multi upload
« Reply #4 on: May 23, 2012, 05:59:08 AM »
Hi Bruce
When will 6.32 be available?
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

Niels Larsen

  • Sr. Member
  • ****
  • Posts: 431
    • View Profile
    • Email
Re: Multi upload
« Reply #5 on: May 23, 2012, 06:55:32 AM »
Thanks Bruce. I think that'll do the trick.
/Niels

Stu

  • Hero Member
  • *****
  • Posts: 510
    • View Profile
    • Email
Re: Multi upload
« Reply #6 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)?
Cheers,

Stu Andrews

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Multi upload
« Reply #7 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

Stu

  • Hero Member
  • *****
  • Posts: 510
    • View Profile
    • Email
Re: Multi upload
« Reply #8 on: July 01, 2012, 06:01:55 PM »
Thanks Bruce.
Cheers,

Stu Andrews