TOPIC:

html5 Upload issue 1 month 1 day ago #262703

  • Topic Author
  • markuubvrd
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 19
  • Thanks: 0
Hi All,

I have the following Problem, I'm using HTML5 Upload field with a max fileupload in a form.

If the file is to big, the customer gets a error message, that far everything is working fine, if the customer is then uploading a new file which is smaller, it looks all fine for the customer. But in the background somehow the first file (which is to big) is still there.

What do I have to do that this file is automatically deleted from where ever the file is, so I only receive the correct file?

Thank you

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

html5 Upload issue 1 month 1 day ago #262710

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 6926
  • Karma: 3
  • Thanks: 493
Hi,

here is update (I deleted previous post):

please go to form->Advacned->More options->Submit pieces->End submit->check Custom and put:
$files = glob('media/breezingforms/uploads/*'); // get all file names who should be saved in that path
foreach ($files as $file) {
    $size = filesize($file);
    if ($size > 1048576) {
        unlink($file);
    }
1048576->represent 1MB, change it to your wantend filesize

Regards,
Tihana

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

html5 Upload issue 4 weeks 2 days ago #262750

  • Topic Author
  • markuubvrd
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 19
  • Thanks: 0
Hi Tihana,

sorry, Im getting to following error:
syntax error, unexpected end of file

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

html5 Upload issue 4 weeks 1 day ago #262757

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 6926
  • Karma: 3
  • Thanks: 493
Hi,

ups, I forgot one {, sorry.

Here is:
$files = glob('media/breezingforms/uploads/*'); // get all file names who should be saved in that path
foreach ($files as $file) {
    $size = filesize($file);
    if ($size > 1048576) {
        unlink($file);
    }
}

Regards,
Tihana

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

html5 Upload issue 3 weeks 6 days ago #262840

  • Topic Author
  • markuubvrd
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 19
  • Thanks: 0
Hi Tihana,
thank you I don't get the error anymore.
But the File which was to big is still there as attachment in the Admin Email, not the entire size. Sorry, but I'm not expierenced enough for the breezingforms.

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

html5 Upload issue 3 weeks 6 days ago #262853

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 6926
  • Karma: 3
  • Thanks: 493
Hi,

np, I am here to help you :)

Please check if attachment is in /media/breezingforms/uploads/

Regards,
Tihana

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

  • Page:
  • 1
  • 2
Moderators: ForumSupport
Time to create page: 0.041 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

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

Special Offer

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