Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#277 closed improve feature (fixed)

Better status/warnings/error messages needed for image uploading

Reported by: matrixpoint Owned by: matrixpoint
Priority: minor Milestone: 0.1.2-outreach-bugfixing
Component: BW General Keywords:
Cc: midsch

Description

We need a warning about maximum picture size for uploading (about 2 MB).

Right now, there is no warning or error message for images that exceed the limit.

Change History (21)

comment:1 Changed 10 years ago by matrixpoint

  • Summary changed from No warning or error message about uploading large images. to Better status/warnings/error messages needed for image uploading

There probably should be some explanatory text on the page (uploadform.php) warning about image files size limit, as well as an error message if this warning is ignored. Other error messages: file is not an image, or is not one of the standard file types for images (e.g., jpg).

Also a simple javascript status indicator, since the loading process can take a long time. Something like, "Loading...".

The programming for this is non-trivial, since up to four images can be uploaded simultaneously. Four sets of error messages might be needed. Also, the error messages must be incorporated into the ...gallery/show/user/... page where the newly uploaded images are normally displayed, or else return to uploadform.php in the event of an error. This would be simpler if only one image was uploaded at a time. This might be the way to go.

comment:2 Changed 10 years ago by matrixpoint

  • Owner set to matrixpoint

comment:3 Changed 10 years ago by matrixpoint

  • follow_up changed from none to test

Made changes in r3589.

Removed 3 of 4 image upload fields. Now, one upload at a time. This makes it much easier to give error reports.

comment:4 Changed 10 years ago by matrixpoint

New words on test:

Gallery_UploadError
Error uploading image.
Error message.

Gallery_UploadNotImage
Not an image file.
Error message.

Gallery_UploadInvalidFileType
File type not recognized.
Error message.

Gallery_UploadImageAlreadyUploaded
This image has already been uploaded.
Error message.

Gallery_UploadFileTooLarge
Maximum image file size exceeded.
Error message.

Gallery_UploadTitle
Upload
Upload page title.

Gallery_UploadInstruction
Select an image on your computer
Upload instruction.

Gallery_UploadWarning
The maximum image file size is
Warning message about maximum upload file size.

Gallery_UploadStatus
Uploading
Status message while uploading.

Gallery_UploadSubmit
Upload
Button label.

Gallery_NotLoggedIn
You must be logged in in order to upload images.
Error message.

comment:5 Changed 10 years ago by matrixpoint

  • follow_up changed from test to move to alpha

Tested on trunk (test).

comment:6 Changed 10 years ago by matrixpoint

  • follow_up changed from move to alpha to test on alpha

Moved to alpha r3591. Still need to move words.

comment:7 Changed 10 years ago by midsch

  • Cc midsch added

Maybe a colletaryl damage from the removed upload fields: the translation links are messed up after the headline ("upload") and on the upload-Button. (In htmlsource it looks like trouble with quotation marks and linebreaks).

comment:8 Changed 10 years ago by matrixpoint

Thanks Midsch. I noticed that too. It's a byproduct of Andreas' new translation enhancements in ticket #228, still on test. It causes some errors in some cases by inserting a link right after translated words. The problem only happens right now if you are on the test server and have translation rights. Login into test in an account such as 'wukk' avoids the problem. A note should be left on #228, but first I want to test this on alpha, where there is no problem.

comment:9 Changed 10 years ago by matrixpoint

Words moved to alpha.

Tested on alpha:

  1. normal upload.
  1. upload file too large (takes several minutes to cause an error due to the very slow server speed as documented in #262). At least the new status word "Uploading..." reassures the user that something is happening.
  1. upload file not an image.
  1. upload file field left blank.
  1. attempt to upload an image already uploaded.
  1. attempt to open the upload page while not logged in.
  1. attempt to upload a BMP image. only GIF, JPG and PNG types are all recognized.

All of the above behaved as expected, producing appropriate feedback.

Ready for second alpha test.

comment:10 Changed 10 years ago by matrixpoint

Midsch, the correct reference to the new translation feature is #263. This ticket is referred to in #228.

comment:11 follow-up: Changed 10 years ago by midsch

Ok, I've noticed in the meantime as well, the described error is not related to this bug (I submit a comment to the other bug).

You're two fast for me, i tried to comment this, but most is redundant:

I've tested the following:

  • uploading an image -> works
  • uploading nothing (pressing upload with out selecting a file) -> proper error message
  • uploading another file than jpg/png -> proper error message (BUT: the valid image formats should be mentioned in the text like the maximum size)
  • uploading a to big image -> proper error message (BUT: it takes a long time ... Probably I get the error message when I reach 2mb, do we know the filesiz when we start uploading an stop the process immediately?)

comment:12 in reply to: ↑ 11 Changed 10 years ago by matrixpoint

Replying to midsch:

You're two fast for me, i tried to comment this, but most is redundant:

In our new release process, we need to have two independent alpha tests, so I appreciate your help. Redundancy is good in this case!

  • uploading another file than jpg/png -> proper error message (BUT: the valid image formats should be mentioned in the text like the maximum size)

Good point.

comment:13 Changed 10 years ago by matrixpoint

Word change:

Gallery_UploadWarning Allowed file types are JPG, GIF, PNG. The maximum image file size is Warning message about maximum upload file size.

comment:14 follow-up: Changed 10 years ago by midsch

Ok, changing the error message makes sense also, but I thought about the text on the page:

"Select an image on your computer

The maximum image file size is 2,0 MB"

I'd like to see something like this:

"Select an image on your computer

Allowed file types are JPG, GIF, PNG. The maximum image file size is 2,0 MB"

(In away the endings are obvious for images, but first there are more formats and second not every user knows it.)

comment:15 in reply to: ↑ 14 ; follow-up: Changed 10 years ago by matrixpoint

Replying to midsch:

I'd like to see something like this:

"Select an image on your computer

Allowed file types are JPG, GIF, PNG. The maximum image file size is 2,0 MB"

That's how it ended up on alpha, but I forgot to update words on test. Both should appear like this now.

comment:16 in reply to: ↑ 15 ; follow-up: Changed 10 years ago by micha

Looks really good now. I tested all image types and can't find any errors in your code anymore.

At the same time we have a stupid problem on test and alpha and I can't figure out the reason: The images you upload get deleted after a while. E.g. Matrixpoint uploaded monique.jpg on alpha and I guess it worked and had thumbnails and so on. But now there is no thumbnail and no original anymore. Sysadmins reported that the created files (on upload) disappeared later. There may be a cronjob or so that's working here but as we didn't find it yet, we also have to consider this a problem of the gallery code. Imagine bringing the code to production and it deletes all our gallery-pics...

Keep up the good work! After solving the image-disappear-problem, we can move this to production.

comment:17 in reply to: ↑ 16 Changed 10 years ago by matrixpoint

Replying to micha:

At the same time we have a stupid problem on test and alpha and I can't figure out the reason: The images you upload get deleted after a while. E.g. Matrixpoint uploaded monique.jpg on alpha and I guess it worked and had thumbnails and so on. But now there is no thumbnail and no original anymore. Sysadmins reported that the created files (on upload) disappeared later. There may be a cronjob or so that's working here but as we didn't find it yet, we also have to consider this a problem of the gallery code. Imagine bringing the code to production and it deletes all our gallery-pics...

I can confirm that I did upload monique.jpg and it was visible after uploading for some time. It's possible this could be related to the changes in the image deletion code that was just put on test and alpha yesterday, but has not reached production yet. This image disappearing problem only started yesterday. See the end of ticket #113.

comment:18 Changed 10 years ago by matrixpoint

Bug found on alpha.

Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /var/www/alpha_html/build/gallery/gallery.ctrl.php on line 141

Moving fix to test and alpha, testing along the way.

comment:19 Changed 10 years ago by matrixpoint

Moved to test in r3601, moved to alpha in r3602.

Tested on test and alpha.

comment:20 Changed 10 years ago by matrixpoint

  • Resolution set to fixed
  • Status changed from new to closed

comment:21 Changed 10 years ago by matrixpoint

  • follow_up changed from test on alpha to none
Note: See TracTickets for help on using tickets.