TOPIC:

File Upload Feedback 2 weeks 6 days ago #282288

  • Topic Author
  • Dankill
  • Offline
  • Junior Member
  • Junior Member
  • Registered
  • Posts: 25
  • Thanks: 0
I am looking to improve the feedback given to a user when they use my file upload element on BreezingForms.
It is setup for HTML5 uploads with flash disabled and a file size limit of 5mb. This all functions fine by default, but users who try to upload larger files... well, it simply fails to upload with no messages or error to tell them what they have done wrong. I have a tooltip warning them of the size limit, but many people will simply be baffled anyway.

So, I need to communicate to the user on an attempt to upload. I have looked for some solutions and believe I will need to do a javascript check of the filesize in the element's actionscript, then throw an error message, but I don't know enough about the file upload element's structure to get started.

Something fairly simple, like:
function ff_upload_action(element, action)
{
    switch (action) {
        case 'click': //On selection of a file, may not be click
            if(element->value->filesize > 5242880)
            {
            message = " File selected is too large to upload. Please select an image of size 5Mb or less.\n";
            }
            break;
        default:;
    } // switch
    return message;
} // ff_upload_action

So, basically, I need to ask about how to check the filesize on upload and make the determination on the file selection.

Please Log in or Create an account to join the conversation.

Last edit: Post by Dankill. Reason: Improving clarity of request.
  • Page:
  • 1
Time to create page: 0.039 seconds

Support Chat

Join our Discord chat and enter the Crosstec channels for live-support, chat forums and interact directly with the community!

After joining, please enter the Crosstec Area and use the #crosstec-support or #crosstec-general channels.

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Subscribe to news and updates!

Special Offer

Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Live Support Chat Opened!

Join our Discord chat here and enter the Crosstec channels to receive live support and talk directly to the team!