Added photo resizer
This commit is contained in:
@@ -64,8 +64,14 @@ export class BoundPhotoPanel extends Component {
|
||||
if (onUploadStarted) {
|
||||
onUploadStarted()
|
||||
}
|
||||
api
|
||||
.upload(response.path || response.uri, this.props.onUploadProgress)
|
||||
|
||||
const uri = response.path || response.uri
|
||||
|
||||
createResizedImage(uri, 800, 600, "JPEG", 80)
|
||||
.then((newUri) => {
|
||||
return
|
||||
api.upload(newUri, this.props.onUploadProgress)
|
||||
})
|
||||
.then((uploadData) => {
|
||||
if (onUploadEnded) {
|
||||
onUploadEnded(true, uploadData)
|
||||
|
||||
Reference in New Issue
Block a user