Open sitexa opened 6 years ago
Actually, I have similar problem with picture upload on iOs. I had an error like this: Not allowed to load local resource : file:///var/mobile I used this solution
https://stackoverflow.com/questions/44910984/ionic-3-file-uri-not-allowed-to-load-local-resource-ios
and app got through this part of code, but eventually it raises exception in this method
`upload(blob: File): Promise
if (!metadata.name) {
metadata.name = DEFAULT_PICTURE_URL;
}
const upload = new UploadFS.Uploader({
data: blob,
file: metadata,
store: PicturesStore,
onComplete: resolve,
onError: reject
});
upload.start();
});
}`
It seems like on iOs code in this method cannot read name and size of picture, so it crashes later on while uploading.
Any suggestions would be nice.
1,From messages-attachments.ts: sendPicture(camera:boolean) -> this.pictureService.getPicture(camera,false) ; 2, From picture.ts:
getPicture(camera:boolean,crop:boolean):Promise<File>
No
Promise<File>
returned to caller. I doubt if the line this.convertURLtoBlob(...) don't work correct, but don't knnow why and have no way to debug. Can anybody help?