[TIMOB-5232] Allow HTTP POST of multiple files to the same parameter
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Low |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | ajax, file, tbs-future, upload |
Reporter | Josh Nicholson |
Assignee | Ingo Muschenetz |
Created | 2011-07-20T12:35:09.000+0000 |
Updated | 2014-06-18T22:53:17.000+0000 |
Description
In [TiNetworkHTTPClientProxy.m](https://github.com/appcelerator/titanium_mobile/blob/master/iphone/Classes/TiNetworkHTTPClientProxy.m), the "send" method currently uses the setFile and setData methods of the "ASIFormDataRequest" object for POST'ing files/images (TiBlob) via Ajax. The SDK should support posting multiple files/images (TiBlob) to the same POST parameter (e.g., http://example.com?file=image1.jpg&file=image2.jpg&file=image3.jpg).
This could be accomplished by using the addData and addFile methods of the "ASIFormDataRequest" class instead.
Josh The link is broken. Please correct, so that we can move this ticket to the correct project. Thanks
The link is not a real link. It was just an "example" (hence, www.example.com). My point was to illustrate an example query string where you might post different values (for example, image files) using the same parameter (in my example, "file"). Thank you.
heh, good point! :) I will move the ticket now.
Josh I am fairly certain that this will be rejected, because it's highly unlikely that a mobile device, with limited bandwidth available, will overwhelm a single connection to a server. Hence concurrent uploads to a host would not really be wise. However, I have moved this to the main project to allow the core team to make the final decision. Cheers