Closed Elfangor93 closed 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.
I uninstalled JG4 and then I installed multiple-upload. This installation process does not work.
Here too:
But even after installing Main and then "Multiple Upload" I get this error when selecting "Multiple New" when uploading images: I am waiting with more tests
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...
I uninstalled JG4 and installed only multiple-upload. I tried to upload a single image with new. The result was: Now I try multiple upload.
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.
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.
I'm waiting for storing the results into the JG4-Files.
I uninstalled JG4 and installed only multiple-upload. I tried to upload a single image with new. The result was: 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?!?
I have tested the following:
Otherwise also with me:
Tested with Linux, Joomla 4.3.1, PHP Version 8.0.15, Browser: Firefox
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!
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
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?
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
In addition to the points already postet, I noticed the following:
If 'Original filename' = Yes in the configuration in the 'Upload' tab, the upload does not work.
When clicking on 'Upload' there is a Javascript error.
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.
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.
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:
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:
jtitle
for the Title fieldjdescription
for the Description fieldjauthor
for the Author field.if I add a picture and change the start numbering, it is ignored.
Confirmed and fixed.
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.
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 ...
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...
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.
I've tried to double check @Elfangor93's changes and can confirm almost everything as fixed.
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...
I could not upload an image larger than 5 MB (error message: debug image)
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?
Excuse me. It must be because of the picture. Other larger images work in single upload and also in multi-upload...
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 ;-)
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?
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.
More information about this:
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.
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?
Is this solved? Yes, but the individual description with the Pen-Symbol works not for me.
Is there a limit for uploads?
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
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)
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...
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...
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.
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.
@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.
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
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)
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
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...
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: "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.
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: 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...
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:
@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?
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
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
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