Forums

This topic is locked

Problem with Pure PHP Image Bundle 2

Posted 02 Feb 2011 03:25:07
1
has voted
02 Feb 2011 03:25:07 Magdolna Szilagyi posted:
I bought last year Pure PHP Image Bundle 2 :

Delete Before Record Addon 1.0.8
Pure PHP Upload 2.1.10
Delete Before Update Addon 1.0.8
Smart Image Processor PHP 2.0.7

Before all, I use them with online forms where my users can upload / update and delete their advertisements with pics.

Now I found out a very strange aspect: the problem is with file .jpg and .JPG

The Pure PHP Upload 2.1.10 uploads files with both of those exts. I mean it uploads pic.jpg and after that as a completly different file pic.JPG too, even I've selected 'Make unique' . That means for Pure PHP Upload 2.1.10 files pic.jpg and pic.JPG are two completly different files.

The problem is coming up when it's time to update or delete the records.

The Delete Before Update Addon 1.0.8 and the Delete Before Record Addon 1.0.8 delete only thumbnails like this: pic_small.jpg , and don't handle at all pic_small.JPG !

So if you have uploaded a pic.JPG his thumbnail becames pic_small.JPG (even if i put everywhere .jpg instead of .JPG in Pure PHP Upload 2.1.10 and Smart Image Processor PHP 2.0.7.)

So when I delete the record, i delete pic.JPG and pic_small.jpg (that in fact does not exist) but leave in
the uploded image folder the file pic_small.JPG as infact was that the uploaded thumbnail file.

After all the funny thing is if you have two or more same filenames:

- if a first user has uploaded a record with pic.jpg his thumbnail is pic_small.jpg

- in a second time a second user uploads an other record with a pic like this: pic.JPG and the thumbnail in
this case is: pic_small.JPG

When the second user deletes (or updates) his record what happens? Hi will delete pic.JPG and pic_small.jpg ! - what is the thumbnail of the firs user ! ( and leave in folder his real thumbnail : pic_small.JPG !

Is there a way to prevent from uploading files .JPG ? or Is there a way to delete files .JPG if they were uploaded ?

Can you please help me with this ? Maybe i'm wrong somewhere ?

Thank you.
Maddalena

Replies

Replied 02 Feb 2011 11:12:03
02 Feb 2011 11:12:03 Patrick Woldberg replied:
This is a typical *nix problem, because *nix is case-sensitive and sees .jpg and .JPG as different files.

If you only allow jpeg images then you could probably use the rename addon to always rename the file to lowercase .jpg.

I also will add a request for the extension to create an option to make filenames all lowercase to prevent these kind of errors.
Replied 02 Feb 2011 17:16:27
02 Feb 2011 17:16:27 Magdolna Szilagyi replied:
Thank you for your reply.

So, first problem with : "If you only allow jpeg images then you could probably use the rename addon to always rename the file to lowercase .jpg."


Yes, i only allow jpg images to upload, but now i tried ad retried the remane addon does not work at all. There was an output that said:

" Error renaming uploaded file

Please Upload the latest version of incPUAddOn.phpPlease correct and try again "

My version is Rename Uploaded Files Addon 1.0.8 .

I've even reinstalled all extensions. Checked on your site, and if i'm not wrong, I have the latest version of that extension. All other extensions work well, so i just can't understand why remane addon does not.

So i can't use this method for bypassing my original problem. Maybe you can help me telling why this is happening to me.

Going back to the original problem, i would be very grateful if you could give me some options, scripts, or anything else, to add onn and prevent uppercase image files " image.JPG " from beeing uploaded, otherwise all the PHP bundle works inappropriately, and users are able to change / delete files to each other involontary, and all my site could look confusionary with thumbnails that have different images that even manually is impossible to put right.

Thank you so much, hoping in your quick help
Maddalena
Replied 13 Feb 2011 14:07:19
13 Feb 2011 14:07:19 Magdolna Szilagyi replied:
I've got your updates with the new features that treat lower case filenames too. Everythings works really good now!
I'm just writing to thank you for all that.[]
Maddalena
Replied 11 Oct 2012 03:36:23
11 Oct 2012 03:36:23 Amya Emilie replied:
I'm looking for an easy to use php image slide show, one much like the ones photoblip and damnlol use.

go to this web site

Reply to this topic