cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cmitch
New Member

"Create File" file type?? Help!

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.  

sc1.PNG

sc2.PNG

Please help!

10 REPLIES 10
Pstork1
Dual Super User III
Dual Super User III

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.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
cmitch
New Member

So you're saying just add ".jpg" after the FileConent?  

cmitch_0-1619790672496.png

 

cmitch_1-1619790699449.png

cmitch_2-1619790710612.png

 

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? 

@Pstork1 

 

Pstork1
Dual Super User III
Dual Super User III

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.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
cmitch
New Member

@Pstork1 

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.  

cmitch
New Member

@Pstork1 

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

cmitch_2-1619792175343.png

 

cmitch_1-1619792156184.png

cmitch_3-1619792204150.png

cmitch_4-1619792216872.png

 

 

Pstork1
Dual Super User III
Dual Super User III

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?



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

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.  

Hey Mate, 

 

In the Run() you will need to return the Filename to Power Automate.

 

The Formula to get the fileName would be 

 

AddMediaButton1.FileName

 

CFernandes_0-1619804964474.png

 

 

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!

cmitch
New Member

@CFernandes thanks for the comment.  I am still getting the same error though.  See pictures:

 

 

cmitch_1-1619808902460.png

 

cmitch_0-1619808867625.png

 

Any other advice? 

 

cmitch_2-1619808942805.png

 

Pstork1
Dual Super User III
Dual Super User III

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.

Upload Image to SharePoint list through PowerApps. | MOURI Tech



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

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!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (1,995)