WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.8 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.12.x) »
  • Modules »
  • Plupload problem with filenames and large files in OneForAll
  • Print
Pages: [1]   Go Down

Author Topic: Plupload problem with filenames and large files in OneForAll  (Read 9004 times)

Offline CodeALot

  • Posts: 579
  • Gender: Male
Plupload problem with filenames and large files in OneForAll
« on: July 25, 2019, 12:34:54 PM »
OneForAll uses PLUPLOAD to handle the upload of images.

What needs to be changed to have PLUPLOAD handle/alter the filename upon saving? It refuses filenames with special characters (copyright-sign, for instance) and does not replace spaces (should be, to avoid validation errors).

Also, I've noticed that PLUPLOAD does not accept large files. If I try to upload an image of say 9 MB, it will come back with the error "Filename already exists". 
Then, when I save the OFA-item and go back into it, I see that the large image was in fact partially saved.
Something goes wrong with the storing of the file, it seems.

WB-version 2.12.2
OFA version 2.0.2.23
PHP 7.3
Logged

Offline dbs

  • Betatester
  • **
  • Posts: 8920
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Plupload problem with filenames and large files in OneForAll
« Reply #1 on: July 25, 2019, 01:15:23 PM »
Hi, try this:
oneforall/ajax/upload.php line 222
Comment out this line
Code: [Select]
$filename   = str_replace(' ', '_', $filename);          // Replace spaces by underscoresadd this line below
Code: [Select]
$filename = media_filename($filename);
@ will be removed. if you want to convert it to something, change the line to
Code: [Select]
$filename = media_filename(str_replace('@', '-at-', $filename));
Info: the function media_filename() comes from framework/functions.php

Large files can't be uploaded if your hoster do not allow this file size or the needed time for this.
Keywords are max_file_size, max_execution_time and more.
It is planned to convert the files before uploading.
Logged
https://onkel-franky.de

Offline CodeALot

  • Posts: 579
  • Gender: Male
Re: Plupload problem with filenames and large files in OneForAll
« Reply #2 on: July 25, 2019, 02:05:39 PM »
Hi , thanks for your reply.

But... you mean UNcomment, right? If I comment out those lines, they won't do anything...

Quote from: dbs on July 25, 2019, 01:15:23 PM
Hi, try this:
oneforall/ajax/upload.php line 222
Comment out this line
Code: [Select]
$filename   = str_replace(' ', '_', $filename);          // Replace spaces by underscoresadd this line below
Code: [Select]
$filename = media_filename($filename);
@ will be removed. if you want to convert it to something, change the line to
Code: [Select]
$filename = media_filename(str_replace('@', '-at-', $filename));
Info: the function media_filename() comes from framework/functions.php

Large files can't be uploaded if your hoster do not allow this file size or the needed time for this.
Keywords are max_file_size, max_execution_time and more.
It is planned to convert the files before uploading.

Yeah, I resize the images now before uploading but it would be nice to be able to upload big files straight from cameras, for instance :)
Logged

Offline dbs

  • Betatester
  • **
  • Posts: 8920
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Plupload problem with filenames and large files in OneForAll
« Reply #3 on: July 25, 2019, 02:18:06 PM »
Yes, sorry, i mean comment the line 222. this line should do nothing.
Code: [Select]
// $filename   = str_replace(' ', '_', $filename);          // Replace spaces by underscoresBecause the next new line do the work. :-)
Logged
https://onkel-franky.de

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.12.x) »
  • Modules »
  • Plupload problem with filenames and large files in OneForAll
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2