web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / PowerApps Attachment C...
Power Apps
Unanswered

PowerApps Attachment Control Uploaded File Size Validation

(0) ShareShare
ReportReport
Posted on by 2

We are using the Power Apps Attachments control to upload files like word documents, excel sheets etc. By using PowerApps without Flow How to validate the uploaded file size is greater than 0 KB or not? if the file size is 0 KB then display error message to the users.

 

Categories:
I have the same question (0)
  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @rkgoriparthi ,

     

    The file size can only be judged after the user uploads it.

    If the file size is 0KB, delete the file, otherwise keep it.

     

    I assume you save the attachments to the attachment column in list.

    I did a test for you.

     

    1\ This is my flow 'Test50'.

    v-xiaochen-msft_1-1619762238990.png

    Id: Ask in powerapps

    v-xiaochen-msft_3-1619762342217.png

    Value:div(int(length(string(outputs('Get_attachment_content')?['body']))),1024)

    v-xiaochen-msft_4-1619762399326.png
     
    2\ Set the submit icon Onselect property to:
    SubmitForm(your form);Set(A,Test50.Run(your form.LastSubmit.ID,your form.LastSubmit.ID).thevar3)
     
    3\ Add a label control and set its Text property to:
    A
    v-xiaochen-msft_7-1619763010139.png

     

    Best Regards,
    Wearsky
    If my post helps, then please consider Accept it as the solution to help others. Thanks.
  • rkgoriparthi Profile Picture
    2 on at

    How to validate the uploaded file size is greater than 0 KB or not? if the file size is 0 KB then display error message to the users by using only PowerApps without Flow?

  • v-xiaochen-msft Profile Picture
    Microsoft Employee on at

    Hi @rkgoriparthi ,

     

    This is impossible. Just using powerapps can't meet your requirements.

     

    Best Regards,

    Wearsky

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 396 Most Valuable Professional

#2
11manish Profile Picture

11manish 134 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 101 Super User 2026 Season 2

Last 30 days Overall leaderboard