cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
EdHansberry
Level 8

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
Power Apps Staff FilipK
Power Apps Staff

Re: Image Uploaded to Azure Storage Blob is 0 bytes

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
Power Apps Staff FilipK
Power Apps Staff

Re: Image Uploaded to Azure Storage Blob is 0 bytes

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

EdHansberry
Level 8

Re: Image Uploaded to Azure Storage Blob is 0 bytes

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
thirdimage

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors
Users online (6,165)