parse-lite icon indicating copy to clipboard operation
parse-lite copied to clipboard

File uploading, React Native

Open djkmiles opened this issue 8 years ago • 1 comments

How does one set about uploading a file using this library, specifically using React-Native?

djkmiles avatar Dec 01 '17 01:12 djkmiles

Here is some sample code:

ImagePicker.openPicker({
    width: 500,
    height: 707,
    cropping: true
}).then(image => {
    var Upload = {_className: 'Upload', file: {url: image.path, name: 'upload.jpeg', __type: 'File'}}
    console.log(Upload)
    Auth.shared.create('Upload', Upload, this.reload)
}, error => console.log(error))

ImagePicker is react-native-image-crop-picker Auth.shared.create is my interface for calling Save(app, className, object, options)

djkmiles avatar Dec 01 '17 01:12 djkmiles