How to use Dropzone Extension in WYSIWYG Web Builder Version 17 (Tutorial)

Do you want to share WYSIWYG Web Builder tips, tricks, tutorials or useful HTML code? You can post it here...
(no questions or problems please, this section is not monitored by support).
Forum rules
This section is to share tips, tricks and tutorials related to WYSIWYG Web Builder.
Please do not post questions or problems here. They will not be answered.

PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
Post Reply
User avatar
dapson
 
 
Posts: 375
Joined: Tue Jan 26, 2016 4:11 pm
Location: Accra, Ghana
Contact:

How to use Dropzone Extension in WYSIWYG Web Builder Version 17 (Tutorial)

Post by dapson »

Dropzone is a free WYSIWYG Web Builder Extension that helps you add file drag and drop functionality to your website. It supports image thumbnail previews, progress bars, multiple files, synchronous uploads and has many customization options. The extension also includes a built-in PHP script to handle the server-side part of the upload.

In this tutorial, we will take a look at how to use Dropzone Extension in WYSIWYG Web Builder Version 17.

Watch the tutorial here: https://youtu.be/vQiitn7CW8g
User avatar
Magical
 
 
Posts: 111
Joined: Thu Dec 14, 2017 5:08 pm
Contact:

Re: How to use Dropzone Extension in WYSIWYG Web Builder Version 17 (Tutorial)

Post by Magical »

I must have gotten a bad download or something of the dropzone extention. I keep getting the following error:
[24-Dec-2022 14:14:12 America/Boise] PHP Fatal error: Uncaught Error: Call to undefined function each() in /home3.../fileuploader.php:5
It does not like the "each()" function in:

<?php
$uploaddir = 'archive_intake';
$allowed = array('pdf');
$max_size = 10 * 1024 * 1024;
while (list ($key, $val) = each ($_FILES))
{
if ($_FILES[$key]['size'] <= $max_size)
{
$file_ext = pathinfo($_FILES[$key]['name'],PATHINFO_EXTENSION);
$file_name = basename($_FILES[$key]['name'],'.'.$file_ext);
if (in_array(strtolower($file_ext),$allowed))
{
$name = $_FILES[$key]['name'];
$x = 1;
while (file_exists($uploaddir.'/'.$name))
{
$name = $file_name.'['.$x.'].'.$file_ext;
$x++;
}
if (move_uploaded_file($_FILES[$key]['tmp_name'],$uploaddir.'/'.$name))
{
chmod($uploaddir.'/'.$name, 0644);
}
else
{
die(error_get_last());
}
}
else
{
die("Invalid file type");
}
}
else
{
die("File size too big");
}
}
?>

Are there any fixes. It will not upload the files to a folder.
User avatar
BaconFries
 
 
Posts: 5325
Joined: Thu Aug 16, 2007 7:32 pm

Re: How to use Dropzone Extension in WYSIWYG Web Builder Version 17 (Tutorial)

Post by BaconFries »

@Magical Please read the forum rules above
"Please do not post questions or problems here. They will not be answered"
Post Reply