web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / upload an image to sha...
Power Apps
Answered

upload an image to sharepoint

(0) ShareShare
ReportReport
Posted on by 53

Hi all,

 

Really struggling with this one,

I can upload a file to Flow and then to SharePoint with an attachment ok, using the following in Power Apps:

v2Upload.Run({file:{contentBytes:Last(AttachmentControl.Attachments).Value, name:Last(AttachmentControl.Attachments).Name}})

 

However trying to use an image ( pen input) I cannot get it to run properly, the test in Flow works ok but the formula in Power Apps, is failing, 

 

really appreciate any feedback or an example of what to do,

 

cheers

Sean

Categories:
  • Verified answer
    WarrenBelz Profile Picture
    156,532 Most Valuable Professional on at

    Hi @seanct ,

    Without seeing your Flow it is a bit difficult - but this is the structure you would need for a Pen input

    v2Upload.Run(
     {
     file:
     {
     contentBytes: YourPenInput.Image, 
     name: "YourFileName".jpg
     }
     }
    )

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

     

  • seanct Profile Picture
    53 on at
    Hi Warren,
     
    many thanks for coming back to me, much appreciated, I tried this which is similar to what I have been using but still not happy.
     
    pretty straight forward flow.in V2 
    seanct_3-1702447217555.png

     

     
    seanct_2-1702447175905.png

     

     

     

     
    then to Sharepoint
     
     

     

     
    be great if you can spot anything I am missing,
     
    cheers
    Sean
     
  • WarrenBelz Profile Picture
    156,532 Most Valuable Professional on at

    Hi @seanct ,

    Just ran it here successfully (the Flow) - you need also the save it as a gif file (not a jpg)

    WarrenBelz_0-1702449712820.png

    WarrenBelz_1-1702449812983.png

     

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • seanct Profile Picture
    53 on at

    thanks Warren, that worked great, really appreciate you taking the time to reply and help with this.

     

    Sean

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 409 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 252 Most Valuable Professional

Last 30 days Overall leaderboard