cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

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
Highlighted
Super User II
Super User II

Re: send images to server

9 REPLIES 9
Highlighted
Super User II
Super User II

Re: send images to server

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

 

Highlighted
Helper V
Helper V

Re: send images to server

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

Highlighted
Super User II
Super User II

Re: send images to server

Highlighted
Helper V
Helper V

Re: send images to server

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

Highlighted
Helper V
Helper V

Re: send images to server

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 ? 

Highlighted
Resident Rockstar
Resident Rockstar

Re: send images to server

@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!

Highlighted
Helper V
Helper V

Re: send images to server

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

Highlighted
Resident Rockstar
Resident Rockstar

Re: send images to server

@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!

Highlighted
Helper V
Helper V

Re: send images to server

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
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Users online (6,612)