cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
EdHansberry
Kudo Collector
Kudo Collector

Image Uploaded to Azure Storage Blob is 0 bytes

I am trying to create an app on a phone that will upload a picture to AzureStorageBlob using the phone's camera. I'm connected to the StorageBlob ok and this is the code for the "on submit" button:

 

 

Set(varPhotoStorage, AzureBlobStorage.CreateFile("storageblobname", lblPictureName.Text, Camera1.Photo));

 

 

The file name I want to use is generated in the label lblPictureName and that gets added just fine, as does all of the other info (date uploaded, etc. But the file size is zero, and when I download the file, it is actually zero, so not a real JPG file.

 

What am I missing here? I thought the .Photo property of the Camera control was the actual file when the picture was taken, but that isn't getting sent, or I'm doing something else wrong and a picture isn't actually being taken. Though I did test this on my iPhone and it is giving the pic taken sound when I hit the submit button.

1 ACCEPTED SOLUTION

Accepted Solutions
FilipK
Power Apps
Power Apps

You need to click (or tap on mobile) on the camera control in order for the Photo to be taken.  You can check by displaying it in an image control (Set the Image control's Image property to Camera1.Photo) to see if the photo is actually being taken.

- not filipk@microsoft.com, please private message me if you can't share with everyone

View solution in original post

2 REPLIES 2
FilipK
Power Apps
Power Apps

You need to click (or tap on mobile) on the camera control in order for the Photo to be taken.  You can check by displaying it in an image control (Set the Image control's Image property to Camera1.Photo) to see if the photo is actually being taken.

- not filipk@microsoft.com, please private message me if you can't share with everyone

View solution in original post

Ok. Dumb rookie mistake on my part. Is there a way to have the Submit button take the pic and upload? Or do I need to put all of my "On Select" logic in the Camera control itself?

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,553)