I ran into this today when testing out the module. I took some photos and ziped them in OS X, but on uploading, I got errors:

file_check_upload = SUCCESS
Creating Directory sites/default/files/pblog/5
php does not have built in zip support using system call to the unzip binarystatus
Pblog 2009 — A Photo Review has been created.
Unable to creating strip
Unable to creating thumbnail
Unable to creating medium image

I took the same file, created a zip from them on another computer, uploaded them and it worked fine.

Which leads me to believe that either the metadata that OS X adds is interfering somehow, or the file permissions are retained when the file is unzipped, causing a permission error. I looked on the server and the images are correctly decompressed into a new folder.

CommentFileSizeAuthor
#2 pblog-[unk].patch4.39 KBemgee3

Comments

emgee3’s picture

Category: bug » feature
Priority: Normal » Minor

Ok, I take back what I said. I checked the permissions and that wasn't the problem. The problem was zipped a folder containing the files. So rather than a bug report, I'd like to suggest that the zip file be decompressed with the setting to decompress without regard to the folder structure, which would prevent this error from occurring.

emgee3’s picture

Project: Project CVS instructions » Pblog
Category: feature » bug
Priority: Minor » Normal
Status: Active » Needs review
StatusFileSize
new4.39 KB

So doing a review of the code, it appears that no checking was done to make sure the files uploaded were image formats. As well, OS X metadata in a zip file creates folders that interfere with the normal operation of Pblog. I've created a patch that deletes OS X metadata as well as files that are not common image formats — jpeg, gif and png.

I realize there are smarter ways of doing this, but my php skills are not up to it, and I think my modifications are better than nothing.

baldy’s picture

Assigned: Unassigned » baldy
Status: Needs review » Active

Thanks for the patch emgee3, looks good. I till test it and commit to CVS. Probably release a version actually.
It would be neater to use a function for the deletes rather than a system call to rm (which I have also used :) ).

Thanks again for the patch and let me know if you do any others.

Regards
Laurence