RTC Forums
November 24, 2024, 11:44:12 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Login
Register
RTC Forums
>
Subscription
>
Support
>
Multiple file uploads (using multipart/form-data)
Pages: [
1
]
« previous
next »
Print
Author
Topic: Multiple file uploads (using multipart/form-data) (Read 4631 times)
Dany
RTC License++
Posts: 69
Multiple file uploads (using multipart/form-data)
«
on:
September 04, 2014, 12:55:27 PM »
Hello!
I put an input element of type file on my form and add the multiple property to the element. As the request is processed i can count the number of files using ItemCount and access the filenames using ItemValue (i think). But i cannot find a GetFile function taking an integer index parameter so i do not know how to write the individual files to disk/stream (i'd like to process them one at a time). Browsers seem to name the multiple elements the same so using GetFile('file', 'Name1') does not seem to do it. Also Element['file', 0] returns a string.
TIA,
/Dany
Logged
D.Tkalcec (RTC)
Administrator
Posts: 1881
Re: Multiple file uploads (using multipart/form-data)
«
Reply #1 on:
September 04, 2014, 06:11:23 PM »
OK. Download the latest RTC SDK update (v6.38).
Now, multiple file uploads using the "multiple" attribute are also supported and the "QuickStart/BrowserUpload" example is updated to demonstrate how to use this new feature.
In short, you can now check how many files were uploaded by using the "ElementCount" property, access all file names through the "Element" property and permanently store files using the "GetFile" method, which has a new "FileIndex" parameter to speficy which file you want to access (index starting at 0).
Best Regards,
Danijel Tkalcec
Logged
Dany
RTC License++
Posts: 69
Re: Multiple file uploads (using multipart/form-data)
«
Reply #2 on:
September 04, 2014, 06:18:17 PM »
WOW Danijel!
I'll check it out tomorrow and during the weekend. This was really really nicely done of you.
You see, i'm very reclusive against parsing manually. And even though i just found out i could use the HTML5 FormData object to transfer from the input object to file-entries in a new the multipart with varying names the "API" that my server exposes will not be 100% cool for others who want to communicate with it.
Thanks a BUNCH!
Regards,
/Dany
Logged
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Dashboard
-----------------------------
=> General
=> 3rd-Party
=> Quick Start
-----------------------------
Subscription
-----------------------------
=> Support
Loading...