Commit Graph

6 Commits

Author SHA1 Message Date
Philipp von Weitershausen 3269af227f Back out D2098670: Allow uploading a native file (e.g. photo) via XMLHttpRequest 2015-05-26 12:50:25 -08:00
Philipp von Weitershausen 4273af9e29 Allow uploading a native file (e.g. photo) via XMLHttpRequest
Summary:
With this in place, it's possible to upload a picture from the `CameraRoll` to Parse, for instance:

    xhr = new XMLHttpRequest();
    xhr.onload = function() {
      data = JSON.parse(xhr.responseText);
      var parseFile = new Parse.File(data.name);
      parseFile._url = data.url;
      callback(parseFile);
    };
    xhr.setRequestHeader('X-Parse-Application-Id', appID);
    xhr.setRequestHeader('X-Parse-JavaScript-Key', appKey);
    xhr.open('POST', 'https://api.parse.com/1/files/image.jpg');
    // assetURI as provided e.g. by the CameraRoll API
    xhr.send(new NativeFile(assetURI));

Closes https://github.com/facebook/react-native/pull/1357
Github Author: Philipp von Weitershausen <philikon@fb.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-05-26 09:45:34 -08:00
Nick Lockwood cfeae15c1f Fixed thread safety for RCTImageLoader 2015-05-13 13:24:36 -07:00
Nick Lockwood 5e160f168d Added support for local image to RCTImageLoader 2015-05-13 13:24:35 -07:00
Christopher Chedeau 5baffa03fd Second Updates from Mon 23 Mar
- [ReactNative] Use deprecated ix in TabBarExample | Amjad Masad
- [ReactNative] Expanded license on obj-c files | Christopher Chedeau
- [ReactNative] Expanded license on js files | Christopher Chedeau
- [ReactNative] Fix React Devtools integration | Alex Kotliarskyi
- [Text] Account for font leading so descenders are not clipped | James Ide
- [ReactNative] Expanded license on js packager files | Christopher Chedeau
- more UIExplorer flow | Basil Hosmer
- [react-packager] Pick up package changes while running | Amjad Masad
- Added a graph view and a ReactNative metric that displays current queue and execution time for the JS thread. | Bryce Redd
- [ReactNative] Add NativeModules and DeviceEventEmitter to react-native exports | Alex Kotliarskyi
2015-03-23 15:07:33 -07:00
Alex Kotliarskyi fab5ec617d Updates from Tue Mar 10
- [ReactNative] Make tests run on TravisCI | Alex Kotliarskyi
- [Relay] Update Relay + ES6 class containers | Christoph Pojer
- [React Native] Add RCTAdSupport.xcodeproj | Alexsander Akers
- [ReactNative][Android] Fix after a new React version was downstreamed | Philipp von Weitershausen
- [React Native] Add preliminary animation API | Alex Akers
- [ReactKit] Create test for OSS ReactKit | Alex Kotliarskyi
- [React Native][Device ID][wip] implement most basic js access | Alex Akers
- [ReactNative] OSS Picker | Spencer Ahrens
- [ReactNative] Fix typo in RCTUIManager | Tadeu Zagallo
- [ReactNative] Fix GeoLocation files letter case | Tadeu Zagallo
- Unified the method signature for addUIBlock: to further simplify porting ViewManagers | Nick Lockwood
- [ReactNative] Oss GeoMap | Tadeu Zagallo
- [ReactNative] OSS CameraRoll | Tadeu Zagallo
- [ReactNative] allowLossyConversion on NSString->NSData conversion | Andrew Rasmussen
- [React Native][RFC] Print __DEV__ value on app start | Alex Kotliarskyi
2015-03-10 19:54:10 -07:00