cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JérômeD
Frequent Visitor

Store photo on Sharepoint

Hi everyone,

 

I'm trying to build an app wich store some photo tanks to camera controler in a folder in sharepoint. For the moment I can create a file and store it in the good folder but the file is not a picture.

So I'm testing a new flow wich is able to covert this file in picture but i don't understand why it don't works. Thanks to my new flow I can go on the good floder but there is no file (photo) wich is created.  (My app is not the problem)

 

Thanks for your help !

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @JérômeD :

Maybe on your side the formula should be:

Set(Thepic;JSON(Camera1.Photo;JSONFormat.IncludeBinaryData));;
Set(Base64Only;Mid(Thepic;Find(",";Thepic)+1;Len(Thepic)-Find(",";Thepic)-1));;
'PowerAppV2->Compose,Createfile'.Run("ThePic.jpg";Base64Only)

 

v-bofeng-msft_0-1622509158627.png

Formula separators and chaining operator

Best Regards,

Bof

 

View solution in original post

3 REPLIES 3
v-bofeng-msft
Community Support
Community Support

Hi @JérômeD :

Do you want to upload the photo taken over the phone to the SharePoint library?

If so,I've made a test  for your reference:
1\Add a camera control(Camera1)

2\Create a flow('PowerAppV2->Compose,Createfile')

v-bofeng-msft_0-1622452192244.png

/*This flow's trigger is PowerAppV2*/

3\Add a button and set it's OnSelect property to:

Set(Thepic,JSON(Camera1.Photo,JSONFormat.IncludeBinaryData));
Set(Base64Only,Mid(Thepic,Find(",",Thepic)+1,Len(Thepic)-Find(",",Thepic)-1));
'PowerAppV2->Compose,Createfile'.Run("ThePic.jpg",Base64Only)

TheResult

v-bofeng-msft_1-1622452310539.png

In addition,your flow did not add the file suffix ".jpg" when setting the name of the file to be created

Best Regards,

Bof

 

 

JérômeD
Frequent Visitor

Thanks a lot for your answer, it's exactly what I need.

 

I just have some probleme with  the button property :

 

Sans titre.png

I don't understand what is the point of FileConcat and his relation with the function (base64tobinary...) and what is "text_1" in this function.

 

I don't know if my explanations are clear for you, thanks a lot for your help !

 

Hi @JérômeD :

Maybe on your side the formula should be:

Set(Thepic;JSON(Camera1.Photo;JSONFormat.IncludeBinaryData));;
Set(Base64Only;Mid(Thepic;Find(",";Thepic)+1;Len(Thepic)-Find(",";Thepic)-1));;
'PowerAppV2->Compose,Createfile'.Run("ThePic.jpg";Base64Only)

 

v-bofeng-msft_0-1622509158627.png

Formula separators and chaining operator

Best Regards,

Bof

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,970)