cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
langsem
Post Patron
Post Patron

send images to server

Hi i have an power app that takes some images and tags them with a string. I wonder if its possible to send those with a Api trough a button click ? 

1 ACCEPTED SOLUTION

Accepted Solutions

9 REPLIES 9
Jay-Encodian
Community Champion
Community Champion

Hey@langsem

This may be of interest - https://powerapps.microsoft.com/es-es/blog/register-and-use-custom-apis-in-powerapps/

The API you are sending data to is going to govern how you do this... you can always add a button to your PowerApp which invokes a Flow, you can then use the HTTP Connector to submit data as needed to an API endpoint.

HTH

Jay

 

thanks! will look into the link, never worked With flow before any tutorials on it ? 

thank u, i might think this could be the solution !

I have tried to make a flow and Connected it to my button in Power apps. With this code onSelect UploadaphototoSharePointfromPowerApps.Run(SONR.Text; FORSIKRING.Text; Pics)

It throws and error saying it gives 3 arguments but was just expecting one. How can i increase amount of arguments ? 

@langsem I have created a YouTube video around this topic. https://www.youtube.com/watch?v=V8LpZpPGtV8

 

The supporting article with formula's can be found at  for the https://clavinfernandes.wordpress.com/2020/02/12/convert-multiple-power-apps-media-controls-from-pow... 

 

You can also find a similar topic in which I export an entire gallery of images at https://clavinfernandes.wordpress.com/2019/08/08/convert-all-images-from-powerapps-gallery-control-t...

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

will this work if i have 5 images thats stored in a Collection and 2 strings thats stored in textfields ? ? 

@langsem Technically, yes! It should work.

 

To simplify things, Create three variable in Power Automate,  

 

  • Variable 1 - Holds the Collection(JSON)
  • Variable 2- Holds Text Field A
  • Variable 3 - Holds Text Field B.

 

Using the Flow.RUN function send all the three variable to Power Automate. Once you have those in Power Automate, send it any data-source of your choice.

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Hm i see. My api expects this body 
{
  "item": {
    "attrs": {
      "attr": [
        {
          "name": "string",
          "value": "string"
        }
      ]
    },
    "resrs": {
      "res": [
        {
          "filename": "string",
          "base64": "string"
        }
      ]
    },
    "acl": {
      "name": "string"
    },
    "entityName": "string"
  }
}



Not entirely sure how i shall pass my values into the string Fields. but on the Power apps when i take a image it stores a name of the image and the image itself i assume i have to pass the name of the image into one of the Fields, convert the image into a base64 then add the two textfields into the body aswell 

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (3,617)