Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5232] Allow HTTP POST of multiple files to the same parameter

GitHub Issuen/a
TypeNew Feature
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsiOS
Labelsajax, file, tbs-future, upload
ReporterJosh Nicholson
AssigneeIngo Muschenetz
Created2011-07-20T12:35:09.000+0000
Updated2014-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.

Comments

  1. Paul Dowsett 2011-07-25

    Josh The link is broken. Please correct, so that we can move this ticket to the correct project. Thanks
  2. Josh Nicholson 2011-07-25

    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.
  3. Paul Dowsett 2011-09-07

    heh, good point! :) I will move the ticket now.
  4. Paul Dowsett 2011-09-08

    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

JSON Source