JoomGalleryfriends / JG4-dev

Development repository for JoomGallery v4.x
GNU General Public License v3.0
10 stars 6 forks source link

Multiple upload #94

Closed Elfangor93 closed 1 year ago

Elfangor93 commented 1 year ago

Multi-upload with uppy, tus and async-sema.

This PR adds a form to upload multiple images into the same category. You find the form in the Joomla backend in Components > JoomGallery > Images > New > Multiple New.

All configuration settings which are not red in the tab "General Settings" (level one tab) are taken into account and will influence the result or the upload process itself.

Upload form

grafik

On the right hand side the general image data can be inserted, the same way is it was done in JG3 Drag'N'Drop uploader. Data enterd here is used for all the images. Inside the uppy form to the left there is a edit button below each image preview allowing to adjust title, author and description for each image individually. This data on each image will override the general data from the right form if available. If activated in the configuration the image metadata will override the general and individual data from the upload form. (Priority: Metadata > individual image data > general form data)

Below the uppy form the debug mode can be activated. This works similarly as in JG3 Drag'N'Drop uploader. But the uploader will display debug data additionally in the browser console.

Request protocol for one image

grafik Multiple requests to the server are perfomed for each upload. Except for the last POST requests, all the requests are from the tus communication protocol uploading the files to the server.

System architecture

Test instructions

AlexanderSupp commented 1 year ago

I tested the actual status. Multiple uploads works. Images stored in temp file. It's great to see how multiple images load in the same time. I wait for next action to see the images in the normal JG4 file structure. BTW: I uninstalled JG4 and then I installed multiple-upload. This installation process does not work. I installed JG4 main and then multiple-upload and that works.

reni68 commented 1 year ago

I uninstalled JG4 and then I installed multiple-upload. This installation process does not work.

Here too: 94_1

reni68 commented 1 year ago

But even after installing Main and then "Multiple Upload" I get this error when selecting "Multiple New" when uploading images: 94_2 I am waiting with more tests

MrMusic commented 1 year ago

A hint from me: Thanks for testing, but this PR status is still on 'Draft', which means it is still in progress and not yet finished...

AlexanderSupp commented 1 year ago

I uninstalled JG4 and installed only multiple-upload. I tried to upload a single image with new. The result was: grafik Now I try multiple upload.

eumel1602 commented 1 year ago

I looked it up and found the following:

I tested with Win / Joomla 4.3.1 / php 8.0.20 / Browser: FF , Edge and Chrome. the errors are the same in all three browsers.

AlexanderSupp commented 1 year ago

The same photo with multiple new. Info-File: {"id":"69678a4aff7219fee6e0bedeb4499328","size":721679,"offset":721679,"extension":"jpg","filename":"Blumenmeer - Kopie.jpg","mimetype":"image\/jpeg","ispartial":false,"isfinal":true,"relativepath":"null","name":"Blumenmeer - Kopie.jpg","type":"image\/jpeg","owner":"Alexanders Fotos","filetype":"image\/jpeg"} Checked JPG-File (in Temp with no extension) and this looks fine. The Owner is correct. I modified this as author, before upload. But the Author is not the owner.

grafik

I'm waiting for storing the results into the JG4-Files.

eumel1602 commented 1 year ago

I uninstalled JG4 and installed only multiple-upload. I tried to upload a single image with new. The result was: grafik Now I try multiple upload.

Yes, that's the case for me too, a single upload doesn't work. But it can be that this doesn't have to work in this PR?!?

reni68 commented 1 year ago

I have tested the following:

94_1 94_2 94_3

94_4

Otherwise also with me:

Tested with Linux, Joomla 4.3.1, PHP Version 8.0.15, Browser: Firefox

Elfangor93 commented 1 year ago

I tried to upload a single image with new. The result was: Now I try multiple upload.

Confirmed and fixed. Upload a single image works again. Thank you for reporting!

Elfangor93 commented 1 year ago

If I want to edit something using the pencil symbol before uploading an image, I can then save it. Unfortunately, it only saves the field that I edited last. So: I can change three things (title, description and author) if I change all three at once and then save, then all three must also be changed. Currently only the last thing I edited is saved.

Confirmed. Since this is an issue of the uppy library this has to be fixed in the uppy project. Bug is already reported in the corresponding repository: https://github.com/transloadit/uppy/issues/4427

Elfangor93 commented 1 year ago

If I change the "title" with the pen symbol and save, this change is not visible in the image, only when the upload starts is it changed during the upload

Thats a feature not a bug. The title of the image preview in the dashboard only changes after the image is successfully uploaded and saved. Before that the original filename is shown. Do you think this should be changed? If yes, why?

eumel1602 commented 1 year ago

If I change the "title" with the pen symbol and save, this change is not visible in the image, only when the upload starts is it changed during the upload

Thats a feature not a bug... Do you think this should be changed? If yes, why?

My feeling on first use was why doesn't the editor rewrite that? I tried to change it again 2 times. After uploading the pictures for the first time, I knew it was possible. After that, I didn't think it mattered that much. I can't judge it technically, but if it works, it would be very nice for me.... (How much time does it take... is it related?!)

I tried to upload a single image with new. The result was: Now I try multiple upload.

Confirmed and fixed. Upload a single image works again. Thank you for reporting!

now its run! THANKS

MrMusic commented 1 year ago

In addition to the points already postet, I noticed the following:

Elfangor93 commented 1 year ago

if I don't assign a title for the picture(s) and/or if I don't assign a category, the upload doesn't work, but you don't see an error message stating the error or what's missing

Confirmed and fixed.

Elfangor93 commented 1 year ago

When multi-uploading, there is a field at the bottom right: "Description" when I write something in there, I couldn't find it later in the individual images. What's the point of the field?

Confirmed. There was a bug in the code such that the description was not submitted with the form. Therefore no description text was saved. Should be solved now.

Elfangor93 commented 1 year ago

I could not upload .webP or .png images. The upload worked, but they are marked with a "yellow" circle in the upper right corner and are not displayed in the image manager...(the set debug mode cannot be called up, the link is not visible)

Here we can observe multiple problems:

Elfangor93 commented 1 year ago

Info-File: {"id":"69678a4aff7219fee6e0bedeb4499328","size":721679,"offset":721679,"extension":"jpg","filename":"Blumenmeer - Kopie.jpg","mimetype":"image/jpeg","ispartial":false,"isfinal":true,"relativepath":"null","name":"Blumenmeer - Kopie.jpg","type":"image/jpeg","owner":"Alexanders Fotos","filetype":"image/jpeg"} Checked JPG-File (in Temp with no extension) and this looks fine. The Owner is correct. I modified this as author, before upload. But the Author is not the owner.

I used owner as the tus-matadata field-id of the Author field since the id author is already used by the uppy dashboard for something else. I renamed now all tus-matadata field-ids to avoid confusion. The new field-ids are:

Elfangor93 commented 1 year ago

if I add a picture and change the start numbering, it is ignored.

Confirmed and fixed.

Elfangor93 commented 1 year ago

I don't see the title of the first picture at all - only in the picture overview.

Can not confirm this. This behavior looks very strange to me. It looks to me as if you are testing with an outdated code-base. Please deinstall and reinstall the component and see if the issue persists. If the issue persists please give me a complete step by step guide how to reproduce the issue.

Elfangor93 commented 1 year ago

Uploading several pictures works very well, but there seems to be a size limit? see screenshot: an image with 7.6MB was not uploaded successfully, but "Saving successfull" appears ...?

The upload limit in the backend is set to be 100GB. So this should not be the problem. It seems to me as if a PHp error accured during the saving process. Before commit https://github.com/JoomGalleryfriends/JG4-dev/pull/94/commits/eaab1caeb96eac7a8612d4f9106dd5901134b142, php errors were not processed correctly into the Javascript and therefore not shown. Please try again and report back the error you get now after applying https://github.com/JoomGalleryfriends/JG4-dev/pull/94/commits/eaab1caeb96eac7a8612d4f9106dd5901134b142 ...

Elfangor93 commented 1 year ago

I can't judge it technically, but if it works, it would be very nice for me...

If its just "nice" I will not implementing it...

Elfangor93 commented 1 year ago

If 'Original filename' = Yes in the configuration in the 'Upload' tab, the upload does not work

Confirmed and fixed. The configuration setting 'Original filename' is now working and applied the same way to single and multiple upload.

eumel1602 commented 1 year ago

I've tried to double check @Elfangor93's changes and can confirm almost everything as fixed.


zugross


nicht zuzruck

Elfangor93 commented 1 year ago

I could not upload an image larger than 5 MB (error message: debug image)

@eumel1602 Does the same image work when you use single upload?

eumel1602 commented 1 year ago

Excuse me. It must be because of the picture. Other larger images work in single upload and also in multi-upload...

Elfangor93 commented 1 year ago

If I e.g. 100 pictures via multiupload, I give each picture an extra description and each picture an extra author. But I want to give each picture a name. But I forgot to enter this under "Title" on the right and go to "Upload"! Then it gives me an error message BUT I can't get the images back. With the "retry" button or the "x" button, all images and all settings are gone!

The form validation was in general very hacky developed. Before the form got validated when the uploads already started, thats why I had to cancel the uploads, but canceling uploads removed the files in the dashboard. Now the form gets validated before the upload starts and the upload only get started when the form is correctly validated.

Thanks @eumel1602 for pointing me towards a much better solution for the same problem ;-)

Elfangor93 commented 1 year ago

If I don't assign a category before uploading, I get the error message: "Please fill out the required fields." But you don't see "red" which field is missing...

There is no nice way to fix that. I tried something. Is that good enough?

AlexanderSupp commented 1 year ago

I uploaded 40 files with Nmb parallel processes 1 and everything works. I uploaded the same 40 files with Nmb parallel processes 10, and I get errors. Some images are OK, other not. Screenshot 2023-05-18 224028 Screenshot 2023-05-18 223313 Screenshot 2023-05-18 223204

AlexanderSupp commented 1 year ago

More information about this:


( ! ) Notice: getimagesize(): Error reading from C:\wamp64\www\Joomla\tmp\tmp_img.jpg! in C:\wamp64\www\Joomla\administrator\components\com_joomgallery\src\Service\IMGtools\IMGtools.php on line 495 -- 1 | 0.0001 | 368184 | {main}( ) | ...\index.php:0 2 | 0.0002 | 368952 | require_once( 'C:\wamp64\www\Joomla\administrator\includes\app.php ) | ...\index.php:32 3 | 0.0083 | 1386656 | Joomla\CMS\Application\CMSApplication->execute( ) | ...\app.php:61 4 | 0.0086 | 1507872 | Joomla\CMS\Application\AdministratorApplication->doExecute( ) | ...\CMSApplication.php:293 5 | 0.0477 | 2596784 | Joomla\CMS\Application\AdministratorApplication->dispatch( $component = ??? ) | ...\AdministratorApplication.php:186 6 | 0.0512 | 2870760 | Joomla\CMS\Component\ComponentHelper::renderComponent( $option = 'com_joomgallery', $params = ??? ) | ...\AdministratorApplication.php:143 7 | 0.0527 | 3075032 | Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch( ) | ...\ComponentHelper.php:361 8 | 0.0530 | 3096696 | Joomgallery\Component\Joomgallery\Administrator\Controller\JoomFormController->execute( $task = 'ajaxsave' ) | ...\ComponentDispatcher.php:143 9 | 0.0530 | 3096760 | Joomla\CMS\MVC\Controller\BaseController->execute( $task = 'ajaxsave' ) | ...\JoomFormController.php:87 10 | 0.0530 | 3096760 | Joomgallery\Component\Joomgallery\Administrator\Controller\ImageController->ajaxsave( ) | ...\BaseController.php:678 11 | 0.0530 | 3096760 | Joomla\CMS\MVC\Controller\FormController->save( $key = ???, $urlVar = ??? ) | ...\ImageController.php:107 12 | 0.0669 | 3516520 | Joomgallery\Component\Joomgallery\Administrator\Model\ImageModel->save( $data = ['id' => '0', 'uploader' => 'tus', 'multiple' => '1', 'uuid' => '5d140b029646c57d5a683cbb6bda9b06', 'imgtitle' => 'title', 'filecounter' => '2', 'catid' => '7', 'published' => '1', 'imgauthor' => '', 'language' => '*', 'debug' => '0', 'imgtext' => '', 'access' => '1', 'tags' => []] ) | ...\FormController.php:675 13 | 0.3724 | 4159968 | Joomgallery\Component\Joomgallery\Administrator\Service\Uploader\Uploader->createImage( $data_row = class Joomgallery\Component\Joomgallery\Administrator\Table\ImageTable { protected $_tbl = '#__joomgallery'; protected $_tbl_key = 'id'; protected $_tbl_keys = [0 => 'id']; protected $_db = class Joomla\Database\Mysql\MysqlDriver { public $name = 'mysql'; protected $nameQuote = '`'; protected $nullDate = '0000-00-00 00:00:00'; protected $utf8mb4 = TRUE; protected $mariadb = FALSE; protected $connection = class PDO { ... }; private ${Joomla\Database\DatabaseDriver}database = 'JoomlaTest'; public $serverType = 'mysql'; protected $count = 88; protected $cursor = NULL; protected $executed = FALSE; protected $limit = 0; protected $offset = 0; protected $options = [...]; protected $sql = class Joomla\Database\Mysql\MysqlQuery { ... }; protected $statement = class Joomla\Database\Pdo\PdoStatement { ... }; protected $tablePrefix = 'aji0d_'; protected $utf = TRUE; protected $errorNum = 0; protected $errorMsg = NULL; protected $transactionDepth = 0; protected $factory = class Joomla\Database\DatabaseFactory { ... }; protected $monitor = NULL; private ${Joomla\Database\DatabaseDriver}dispatcher = class Joomla\Event\Dispatcher { ... }; public $charset = 'utf8mb4' }; protected $_trackAssets = TRUE; protected $_rules = NULL; protected $_locked = FALSE; protected $_autoincrement = TRUE; protected $_columnAlias = ['published' => 'published']; protected $_jsonEncode = []; protected $_supportNullValue = FALSE; public $typeAlias = 'com_joomgallery.image'; protected $_errors = []; private ${Joomla\CMS\Table\Table}dispatcher = class Joomla\Event\Dispatcher { protected $events = [...]; protected $listeners = [...] }; public $form = class Joomla\CMS\Form\Form { protected $data = class Joomla\Registry\Registry { ... }; protected $errors = [...]; protected $name = 'image'; protected $options = [...]; protected $xml = class SimpleXMLElement { ... }; public $repeat = FALSE; private $databaseAwareTraitDatabase = NULL }; public $id = '164'; public $catid = '7'; public $alias = 'as-sam-9288-jpg-2'; public $imgtitle = 'AS-SAM_9288.JPG'; public $imgtext = ''; public $imgauthor = ''; public $imgdate = '2016:11:26 17:16:57'; public $imgmetadata = '{"exif":{"IFD0":{"ImageDescription":"SAMSUNG CSC","Make":"SAMSUNG","Model":"NX300","Orientation":1,"XResolution":"350\\/1","YResolution":"350\\/1","ResolutionUnit":2,"Software":"1.45 ","DateTime":"2016:11:26 17:16:57","YCbCrPositioning":2,"Exif_IFD_Pointer":254},"EXIF":{"ExposureTime":"1\\/40","FNumber":"35\\/10","ExposureProgram":2,"ISOSpeedRatings":400,"ExifVersion":"0221","DateTimeOriginal":"2016:11:26 17:16:57","DateTimeDigitized":"2016:11:26 17:16:57","ComponentsConfiguration":"\\u0001\\u0002\\u0003\\u0000","E'...; public $published = '1'; public $filename = 'as-sam-9288_2_20230518_1691757047.jpg'; public $hits = NULL; public $downloads = NULL; public $imgvotes = NULL; public $imgvotesum = NULL; public $approved = NULL; public $useruploaded = NULL; public $access = '1'; public $hidden = NULL; public $featured = NULL; public $ordering = 42; public $params = '{"jg_dynamic_watermark":"-1","jg_showexifdata":"-1","jg_showgeotagging":"-1","jg_showiptcdata":"-1"}'; public $language = '*'; public $created_time = '2023-05-18 20:57:52'; public $created_by = '290'; public $modified_time = '2023-05-18 20:57:52'; public $modified_by = '290'; public $checked_out = NULL; public $checked_out_time = NULL; public $metadesc = ''; public $metakey = ''; public $robots = ''; public $tags = []; public $asset_id = 497 } ) | ...\ImageModel.php:505 14 | 0.3763 | 4163184 | Joomgallery\Component\Joomgallery\Administrator\Service\FileManager\FileManager->createImages( $source = 'C:\\wamp64\\www\\Joomla\\tmp\\AS-SAM_9288.JPG', $filename = 'as-sam-9288_2_20230518_1691757047.jpg', $cat = '7' ) | ...\Uploader.php:423 15 | 1.8511 | 4672784 | Joomgallery\Component\Joomgallery\Administrator\Service\IMGtools\IMtools->stream( $quality = 100, $base64 = FALSE, $html = ???, $type = ??? ) | ...\FileManager.php:258 16 | 1.8511 | 4672848 | Joomgallery\Component\Joomgallery\Administrator\Service\IMGtools\IMtools->write( $file = 'C:\\wamp64\\www\\Joomla/tmp/tmp_img.jpg', $quality = 100 ) | ...\IMtools.php:435 17 | 2.3304 | 4674344 | Joomgallery\Component\Joomgallery\Administrator\Service\IMGtools\IMGtools->checkValidImage( $img = 'C:\\wamp64\\www\\Joomla\\tmp\\tmp_img.jpg' ) | ...\IMtools.php:323 18 | 2.3306 | 4674288 | getimagesize( $filename = 'C:\\wamp64\\www\\Joomla\\tmp\\tmp_img.jpg' ) | ...\IMGtools.php:495 ( ! ) Notice: getimagesize(): Error reading from C:\wamp64\www\Joomla\tmp\tmp_img.jpg! in C:\wamp64\www\Joomla\administrator\components\com_joomgallery\src\Service\IMGtools\IMGtools.php on line 495 Call Stack # Time Memory Function Location 1 0.0001 368184 {main}( ) ...\index.php:0 2 0.0002 368952 require_once( 'C:\wamp64\www\Joomla\administrator\includes\app.php ) ...\index.php:32 3 0.0083 1386656 Joomla\CMS\Application\CMSApplication->execute( ) ...\app.php:61 4 0.0086 1507872 Joomla\CMS\Application\AdministratorApplication->doExecute( ) ...\CMSApplication.php:293 5 0.0477 2596784 Joomla\CMS\Application\AdministratorApplication->dispatch( $component = ??? ) ...\AdministratorApplication.php:186 6 0.0512 2870760 Joomla\CMS\Component\ComponentHelper::renderComponent( $option = 'com_joomgallery', $params = ??? ) ...\AdministratorApplication.php:143 7 0.0527 3075032 Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch( ) ...\ComponentHelper.php:361 8 0.0530 3096696 Joomgallery\Component\Joomgallery\Administrator\Controller\JoomFormController->execute( $task = 'ajaxsave' ) ...\ComponentDispatcher.php:143 9 0.0530 3096760 Joomla\CMS\MVC\Controller\BaseController->execute( $task = 'ajaxsave' ) ...\JoomFormController.php:87 10 0.0530 3096760 Joomgallery\Component\Joomgallery\Administrator\Controller\ImageController->ajaxsave( ) ...\BaseController.php:678 11 0.0530 3096760 Joomla\CMS\MVC\Controller\FormController->save( $key = ???, $urlVar = ??? ) ...\ImageController.php:107 12 0.0669 3516520 Joomgallery\Component\Joomgallery\Administrator\Model\ImageModel->save( $data = ['id' => '0', 'uploader' => 'tus', 'multiple' => '1', 'uuid' => '5d140b029646c57d5a683cbb6bda9b06', 'imgtitle' => 'title', 'filecounter' => '2', 'catid' => '7', 'published' => '1', 'imgauthor' => '', 'language' => '*', 'debug' => '0', 'imgtext' => '', 'access' => '1', 'tags' => []] ) ...\FormController.php:675 13 0.3724 4159968 Joomgallery\Component\Joomgallery\Administrator\Service\Uploader\Uploader->createImage( $data_row = class Joomgallery\Component\Joomgallery\Administrator\Table\ImageTable { protected $_tbl = '#__joomgallery'; protected $_tbl_key = 'id'; protected $_tbl_keys = [0 => 'id']; protected $_db = class Joomla\Database\Mysql\MysqlDriver { public $name = 'mysql'; protected $nameQuote = '`'; protected $nullDate = '0000-00-00 00:00:00'; protected $utf8mb4 = TRUE; protected $mariadb = FALSE; protected $connection = class PDO { ... }; private ${Joomla\Database\DatabaseDriver}database = 'JoomlaTest'; public $serverType = 'mysql'; protected $count = 88; protected $cursor = NULL; protected $executed = FALSE; protected $limit = 0; protected $offset = 0; protected $options = [...]; protected $sql = class Joomla\Database\Mysql\MysqlQuery { ... }; protected $statement = class Joomla\Database\Pdo\PdoStatement { ... }; protected $tablePrefix = 'aji0d_'; protected $utf = TRUE; protected $errorNum = 0; protected $errorMsg = NULL; protected $transactionDepth = 0; protected $factory = class Joomla\Database\DatabaseFactory { ... }; protected $monitor = NULL; private ${Joomla\Database\DatabaseDriver}dispatcher = class Joomla\Event\Dispatcher { ... }; public $charset = 'utf8mb4' }; protected $_trackAssets = TRUE; protected $_rules = NULL; protected $_locked = FALSE; protected $_autoincrement = TRUE; protected $_columnAlias = ['published' => 'published']; protected $_jsonEncode = []; protected $_supportNullValue = FALSE; public $typeAlias = 'com_joomgallery.image'; protected $_errors = []; private ${Joomla\CMS\Table\Table}dispatcher = class Joomla\Event\Dispatcher { protected $events = [...]; protected $listeners = [...] }; public $form = class Joomla\CMS\Form\Form { protected $data = class Joomla\Registry\Registry { ... }; protected $errors = [...]; protected $name = 'image'; protected $options = [...]; protected $xml = class SimpleXMLElement { ... }; public $repeat = FALSE; private $databaseAwareTraitDatabase = NULL }; public $id = '164'; public $catid = '7'; public $alias = 'as-sam-9288-jpg-2'; public $imgtitle = 'AS-SAM_9288.JPG'; public $imgtext = ''; public $imgauthor = ''; public $imgdate = '2016:11:26 17:16:57'; public $imgmetadata = '{"exif":{"IFD0":{"ImageDescription":"SAMSUNG CSC","Make":"SAMSUNG","Model":"NX300","Orientation":1,"XResolution":"350\\/1","YResolution":"350\\/1","ResolutionUnit":2,"Software":"1.45 ","DateTime":"2016:11:26 17:16:57","YCbCrPositioning":2,"Exif_IFD_Pointer":254},"EXIF":{"ExposureTime":"1\\/40","FNumber":"35\\/10","ExposureProgram":2,"ISOSpeedRatings":400,"ExifVersion":"0221","DateTimeOriginal":"2016:11:26 17:16:57","DateTimeDigitized":"2016:11:26 17:16:57","ComponentsConfiguration":"\\u0001\\u0002\\u0003\\u0000","E'...; public $published = '1'; public $filename = 'as-sam-9288_2_20230518_1691757047.jpg'; public $hits = NULL; public $downloads = NULL; public $imgvotes = NULL; public $imgvotesum = NULL; public $approved = NULL; public $useruploaded = NULL; public $access = '1'; public $hidden = NULL; public $featured = NULL; public $ordering = 42; public $params = '{"jg_dynamic_watermark":"-1","jg_showexifdata":"-1","jg_showgeotagging":"-1","jg_showiptcdata":"-1"}'; public $language = '*'; public $created_time = '2023-05-18 20:57:52'; public $created_by = '290'; public $modified_time = '2023-05-18 20:57:52'; public $modified_by = '290'; public $checked_out = NULL; public $checked_out_time = NULL; public $metadesc = ''; public $metakey = ''; public $robots = ''; public $tags = []; public $asset_id = 497 } ) ...\ImageModel.php:505 14 0.3763 4163184 Joomgallery\Component\Joomgallery\Administrator\Service\FileManager\FileManager->createImages( $source = 'C:\\wamp64\\www\\Joomla\\tmp\\AS-SAM_9288.JPG', $filename = 'as-sam-9288_2_20230518_1691757047.jpg', $cat = '7' ) ...\Uploader.php:423 15 1.8511 4672784 Joomgallery\Component\Joomgallery\Administrator\Service\IMGtools\IMtools->stream( $quality = 100, $base64 = FALSE, $html = ???, $type = ??? ) ...\FileManager.php:258 16 1.8511 4672848 Joomgallery\Component\Joomgallery\Administrator\Service\IMGtools\IMtools->write( $file = 'C:\\wamp64\\www\\Joomla/tmp/tmp_img.jpg', $quality = 100 ) ...\IMtools.php:435 17 2.3304 4674344 Joomgallery\Component\Joomgallery\Administrator\Service\IMGtools\IMGtools->checkValidImage( $img = 'C:\\wamp64\\www\\Joomla\\tmp\\tmp_img.jpg' ) ...\IMtools.php:323 18 2.3306 4674288 [getimagesize](http://www.php.net/function.getimagesize)( $filename = 'C:\\wamp64\\www\\Joomla\\tmp\\tmp_img.jpg' ) ...\IMGtools.php:495 Save failed with the following error: Filename: AS-SAM_9288.JPG Upload complete (File-Size: 7098.99 KB) Imagetype: thumbnail Used image processor: ImageMagick 7.1.0-51 Q16-HDRI x64 aea87b5:20221016 https://imagemagick.org Resizing to height... Auto-Orient image ... Image manipulation successful. Image-File (as-sam-9288_2_20230518_1691757047.jpg) of type 'thumbnail' successfully created. Imagetype: detail Used image processor: ImageMagick 7.1.0-51 Q16-HDRI x64 aea87b5:20221016 https://imagemagick.org Resizing to height... Auto-Orient image ... Image manipulation successful. Image-File (as-sam-9288_2_20230518_1691757047.jpg) of type 'detail' successfully created. Imagetype: original Used image processor: ImageMagick 7.1.0-51 Q16-HDRI x64 aea87b5:20221016 https://imagemagick.org ERROR: Server problem. The following statement could not be executed in the php code: 'exec(magick convert -quality "100" "C:\wamp64\www\Joomla\tmp\AS-SAM_9288.JPG" "C:\wamp64\www\Joomla\tmp\tmp_img.jpg");' Errors detected in processed image. Abort further processing. Image-File (as-sam-9288_2_20230518_1691757047.jpg) of type 'original' could not be created. There were some errors in the filesystem. Please check the image folders manually and resolve the problems. Image-File (as-sam-9288_2_20230518_1691757047.jpg) of type 'thumbnail' successfully deleted. Image-File (as-sam-9288_2_20230518_1691757047.jpg) of type 'detail' successfully deleted. Image-File (as-sam-9288_2_20230518_1691757047.jpg) of type 'original' successfully deleted.
AlexanderSupp commented 1 year ago

Now I have made 3 attempts with the same 40 images each. At Nmb parallel processes 1, everything OK. At Nmb parallel processes 5, 18 images had errors. At Nmb parallel processes 10, 16 images had errors. It wasn't always the same images that were faulty. I can't see any logic at this point. My processor has 12 cores and the allocation of activities will probably be crucial here.

AlexanderSupp commented 1 year ago

When multi-uploading, there is a field at the bottom right: "Description" when I write something in there, I couldn't find it later in the individual images. What's the point of the field?

Confirmed. There was a bug in the code such that the description was not submitted with the form. Therefore no description text was saved. Should be solved now.

Is this solved?

AlexanderSupp commented 1 year ago

Is this solved? Yes, but the individual description with the Pen-Symbol works not for me.

AlexanderSupp commented 1 year ago

Is there a limit for uploads? Screenshot 2023-05-19 001551

eumel1602 commented 1 year ago

If I don't assign a category before uploading, I get the error message: "Please fill out the required fields." But you don't see "red" which field is missing...

There is no nice way to fix that. I tried something. Is that good enough?

Yes it's OK !


Is this solved? Yes, but the individual description with the Pen-Symbol works not for me.

The problem should be fixed. I tried everything again. Each description will be adopted, whether that is the main description at the bottom right or the individual descriptions with the pencil icon. It works. Can you make more precise statements about the browser, or make your approach specific to this problem? You have to save each description separately when using the pencil icon!?


Is there a limit for uploads?

I tried to upload very small .jpg images. My limit is 64 pieces of images. After that, the upload no longer works. There is no error message, only the note: "Upload failed ? 0 of 0 files uploaded"

I think it has more to do with some memory size or upload size

eumel1602 commented 1 year ago

Up to a certain size, the upload window does not increase although there is still space in this area. You can't make it bigger manually. bug? or exactly what you want? Is that specified and is it firmly written? Or would you rather not waste Manuel's time on it?' (all Browser) breite

Elfangor93 commented 1 year ago

I uploaded 40 files with Nmb parallel processes 1 and everything works. I uploaded the same 40 files with Nmb parallel processes 10, and I get errors.

@AlexanderSupp Can you please give me the output of the browser console too? Maybe there is a JavaScript error...

Elfangor93 commented 1 year ago

There is no error message, only the note: "Upload failed ? 0 of 0 files uploaded"

@eumel1602 Can you please add the output of the browser console? I am pretty sure that there are some JavaScript errors...

Elfangor93 commented 1 year ago

You can't make it bigger manually. bug?

The size of the uppy dashboard is dynamically calculeated in the uppy app. If you want that to be changed you have to open an issue in the uppy repository (https://github.com/transloadit/uppy). I can not change that behavior in JoomGallery.

MrMusic commented 1 year ago

First: Most of the problems should be fixed - thank you @Elfangor93

Still a few problems for me:

1: When klicking on upload, there is a '404 Not Found' error in the browser console for each image. Example: HEAD http://localhost/jg4-dev/administrator/index.php?option=com_joomgallery&task=images.tusupload&uuid=5281b736a4c9d30c8f9ed27080412aec Nevertheless, all images are created.

2: Problem when uploading very large images (6000 x 4000px; about 10MB) When using GD (surely there is an overflow of the memory limit): Javascript Error: Uncaught (in promise) SyntaxError: JSON.parse: unterminated string at line 1 column 12 of the JSON data in webpack://uppy-uploader/src/index.js: 87:23

When using ImageMagick: Also no upload possible. Debug Information:

Upload of file xxx using Uppy failed.
This file is too large to upload. You can change the limits for your site in the component options.
Save failed with the following error: Unable to upload file.

Where it is a limit here? When using Imagemagick should the php memory limit not matter?

3: In general, it should be noted that a image record is always created in the database, even if an error occurs during the upload and no images are created.

AlexanderSupp commented 1 year ago

@eumel1602

Is this solved? Yes, but the individual description with the Pen-Symbol works not for me.

The problem should be fixed. I tried everything again. Each description will be adopted, whether that is the main description at the bottom right or the individual descriptions with the pencil icon. It works. Can you make more precise statements about the browser, or make your approach specific to this problem? You have to save each description separately when using the pencil icon!?

Take a look at my Config. Simply, I select a file. I select the pencil-icon. I typed in Title, Description, Author. I select save. I select upload. Title and Description will not place in the fields. Author is OK.

Screenshot 2023-05-19 120518 Screenshot 2023-05-19 120246 Screenshot 2023-05-19 115759 Screenshot 2023-05-19 120021 Screenshot 2023-05-19 120049

AlexanderSupp commented 1 year ago

I uploaded 40 files with Nmb parallel processes 1 and everything works. I uploaded the same 40 files with Nmb parallel processes 10, and I get errors.

@AlexanderSupp Can you please give me the output of the browser console too? Maybe there is a JavaScript error...

I set Nmb parallel processes to 2. And I limited the images to 11. So I hope you can find something that helps. It was my first time to use the browser console.

console-export-2023-5-19_12-46-5.txt

Screenshot 2023-05-19 123921 Screenshot 2023-05-19 124648

eumel1602 commented 1 year ago

AlexanderSupp: "Take a look at my Config. Simply, I select a file. I select the pencil-icon. I typed in Title, Description, Author. I select save. I select upload. Title and Description will not place in the fields. Author is OK."

Did you notice that this is a bug of the upload method:

Confirmed. Since this is an issue of the uppy library this has to be fixed in the uppy project. Bug is already reported in the corresponding repository: https://github.com/transloadit/uppy/issues/4427

Only one of the three things is saved at a time. (The joomgallery V4 can't do anything about that)

Elfangor93 commented 1 year ago

When klicking on upload, there is a '404 Not Found' error in the browser console for each image. Example: HEAD http://localhost/jg4-dev/administrator/index.php?option=com_joomgallery&task=images.tusupload&uuid=5281b736a4c9d30c8f9ed27080412aec Nevertheless, all images are created.

Yes. This is correct like that. If you upload the same image with uppy multiple times, uppy will send out a request to the TUS server checking if the image is already available in the destination location on the server. If not, the TUS server response back with a 404, telling the client that this image is not yet uploaded. For more information see TUS docu

Elfangor93 commented 1 year ago

Debug Information: Upload of file xxx using Uppy failed. This file is too large to upload. You can change the limits for your site in the component options. Save failed with the following error: Unable to upload file. Where it is a limit here?

@MrMusic This limit comes from the com_media settings. We are using the filesystem-plugins to handle the filesystem. Since this plugins seem to read out some settings from com_media this limits also affect us now... grafik

AlexanderSupp commented 1 year ago

Debug Information: Upload of file xxx using Uppy failed. This file is too large to upload. You can change the limits for your site in the component options. Save failed with the following error: Unable to upload file. Where it is a limit here?

@MrMusic This limit comes from the com_media settings. We are using the filesystem-plugins to handle the filesystem. Since this plugins seem to read out some settings from com_media this limits also affect us now...

Information: In all my test systems, I set Media Maximum Size (in MB) to zero.

AlexanderSupp commented 1 year ago

AlexanderSupp: "Take a look at my Config. Simply, I select a file. I select the pencil-icon. I typed in Title, Description, Author. I select save. I select upload. Title and Description will not place in the fields. Author is OK."

Did you notice that this is a bug of the upload method:

Confirmed. Since this is an issue of the uppy library this has to be fixed in the uppy project. Bug is already reported in the corresponding repository: transloadit/uppy#4427

Only one of the three things is saved at a time. (The joomgallery V4 can't do anything about that)

Thanks for this info. I haven't realized that.

Elfangor93 commented 1 year ago

2: Problem when uploading very large images (6000 x 4000px; about 10MB) When using GD (surely there is an overflow of the memory limit): Javascript Error: Uncaught (in promise) SyntaxError: JSON.parse: unterminated string at line 1 column 12 of the JSON data in webpack://uppy-uploader/src/index.js: 87:23

@MrMusic No a memory limit overflow looks like this: grafik What you get is an invalid json reply from the request. Can you please send me the content of the server request when this error happens? In there we should see what went wrong...

eumel1602 commented 1 year ago

There is no error message, only the note: "Upload failed ? 0 of 0 files uploaded"

@eumel1602 Can you please add the output of the browser console? I am pretty sure that there are some JavaScript errors...

I hope you mean this: browserconsole

Elfangor93 commented 1 year ago

@eumel1602 Just to clarify: You get the above posted JavaScript error when you add more than 64 images to the uppy dashboard and press the upload button?