
Announcements
Hi there,
I'm currently developing an app that allows users to upload photos to Sharepoint from either the Camera media control or the Add Picture control. The user needs to be able to upload multiple photos to a Sharepoint Document Library. I have achieved this with the Camera control using a gallery and Flow to upload the images. However, I ran into trouble with the Add Picture control.
The current process is:
Button3:
Collect(colPhotoImages, AddMediaButton2.Media)Upload:
// convert image to binary
Set(varJSON,With({wJSON:JSON(Image3.Image,JSONFormat.IncludeBinaryData)},With({wCommaPosition:Find(",",wJSON)},Mid(wJSON,wCommaPosition+1,Len(wJSON)-wCommaPosition-1))));
//run flow
NEW_Uploaded_to_Sharepoint.Run("",DepartmentDropdown_1.Selected.Value,varJSON);Flow = NEW_Uploaded_to_Sharepoint.Run(Createfile_FileName,Createfile_FileName_1,Createfile_FileContent)
I found the JSON code from another guide on uploading images to Sharepoint, however this only uploads the first image added to the collection "colPhotoImages".
Example: If I add Picture1, Picture2 and Picture3 to the collection, it will only upload Picture1 to Sharepoint.
Flow:
File Content = base64ToBinary(triggerBody()['Createfile_FileContent'])
Is it possible to set up some code to upload multiple images from an Add Picture control? I played around with ForAll(), but it doesn't allow me to use Set() to use the JSON code. Any help will be greatly appreciated.
Regards,
Jamie