I have a flow where I am creating a new folder, and then uploading images to that folder.
It is all working well, except for the files are being uploaded as a random file type that can not be openned or read! I have tried uploading .png, .jpeg, .xlsx, .doc, but they all just are uploaded as this generic "file" type that does nothing!
Do I need to format the file a specific way after it is uploaded? Or convert file? Or file properties? I've tried a bunch of things but can not get it to work.
Add the appropriate extension to the file name in the Create File action. That will let you open the file after it is created. The file type is determined by the extension, not the actual contents of the file.
So you're saying just add ".jpg" after the FileConent?
Looks like I'm getting closer, but still can't see the picture! I'm using pictures taken from an iPhone, uploaded directly to a powerapp. Does that make a difference?
If you Open OneDrive on your computer can you display the image file? The iPhone way have issues retrieving the file for display. It normally displays images stored locally. Try opening the file using a regular browser to make sure its a file problem and not an iPhone issue.
Yes I have been trying to open it on a regular browser (chrome) on my desktop in Sharepoint. I am attempting to upload the picture via iPhone, and then have it be available to view via Deskstop Sharepoint.
This is driving me nuts. Everything appears to be set up correctly; a file is being uploaded; I just can't view the picture when it finally is!! 😫
I assume you are uploading the file in Power Apps since you are passing the contents as a parameter. How are you generating the contents to pass to the flow?
Answer to that question is in the screenshots of my last message^
Adding the picture via the "tap or click to add a picture" media add button.
In the Run() you will need to return the Filename to Power Automate.
The Formula to get the fileName would be
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!
Your flow shows you using Ask In Power Apps to supply the file content. But your run() command in Power Apps is just passing the filename of the file to the flow. If you look at what is actually being passed you will see that it starts with something like 'APPRES:\\'. Files uploaded into an image in Power Apps are actually cached in the browser and the cache is what is displayed. That makes the contents of the file unavailable without extra processing. Take a look at the following walkthrough.
So many events happening this month - don't miss out!
Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.