Added photo resizer
This commit is contained in:
@@ -64,8 +64,14 @@ export class BoundPhotoPanel extends Component {
|
|||||||
if (onUploadStarted) {
|
if (onUploadStarted) {
|
||||||
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) => {
|
.then((uploadData) => {
|
||||||
if (onUploadEnded) {
|
if (onUploadEnded) {
|
||||||
onUploadEnded(true, uploadData)
|
onUploadEnded(true, uploadData)
|
||||||
|
|||||||
Reference in New Issue
Block a user