Hey there power community!
I have problems converting iphone-pictures to base64.
The whole story: we´ve made an app, that takes pictures (of damaged transports) and saves it to a sharepoint folder. we use a flow for that, where there is a "convert to binary image" function.
all works perfectly when we use laptop camera or android phones! BUT: when i use iphone, the flow replies with following:
Sorry, i cant provide that in english. It basically says, that the converting does not work.
We use following code in powerapps:
ForAll(CollectionVariable; UploadPhotoToSharePoint.Run("EnterPictureNameHere".jpg"; Mid(JSON(ThisRecord.Url;JSONFormat.IncludeBinaryData);24;Len(JSON(ThisRecord.Url;JSONFormat.IncludeBinaryData))-24)));;
I tried to switch the iphone-config to "most compatible" settings for photos. that did not make any difference.
Has anybody a hint for me, how i could get this work?
Thank you very much in advance!
Richard
Solved! Go to Solution.
Hi @RichardWalter ,
Two things - you have left out the Find on the comma (which is the important bit = please see the full code intention), but my advice would be to save the converted text in the collection (convert it when you save the photo) then send that text field to the flow.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Hi @RichardWalter ,
Please review this blog of mine - my users do 10s of thousands of pictures annually on iPads using this process. You will note that the JSON process I use does not assume the commas is at position 24.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
@WarrenBelz thank you for your reply!
If my amateur-view on you suggestion gets this right: you mean i just need to change the numbers to 1 and -1 ?
ForAll(CollectionVariable; UploadPhotoToSharePoint.Run("EnterPictureNameHere".jpg"; Mid(JSON(ThisRecord.Url;JSONFormat.IncludeBinaryData);1;Len(JSON(ThisRecord.Url;JSONFormat.IncludeBinaryData))-1)));;
i tried this, that did not make any difference in the error message.
maybe you would be so kind and describe your suggestion a little bit more?
thank you for your help!
Hi @RichardWalter ,
Two things - you have left out the Find on the comma (which is the important bit = please see the full code intention), but my advice would be to save the converted text in the collection (convert it when you save the photo) then send that text field to the flow.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Visit my blog Practical Power Apps
Hi @WarrenBelz !
We want to thank you for your reply. It opened our eyed to find the solution. It works with the following "finds":
ForAll(CollectionVariable; UploadPhotoToSharePoint.Run("EnterPictureNameHere" &".jpg"; Mid(JSON(ThisRecord.Url;JSONFormat.IncludeBinaryData);Find(",";JSON(ThisRecord.Url;JSONFormat.IncludeBinaryData))+1;Len(JSON(ThisRecord.Url;JSONFormat.IncludeBinaryData))-Find(",";JSON(ThisRecord.Url;JSONFormat.IncludeBinaryData))-1)));;
Thank you!
Richard
User | Count |
---|---|
125 | |
87 | |
86 | |
75 | |
69 |
User | Count |
---|---|
215 | |
180 | |
139 | |
97 | |
83 |