We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

File

Development and Programming

Jacob Fentress's avatar
Jacob Fentress
37 posts
17 years ago
Jacob Fentress's avatar Jacob Fentress

Ok, I’ve come across a bit of an issue, and I’m not even sure it is the fault of the file extension, but it is the best I could figure.

I have the extension set to resize the uploaded image based on width. The resizing (and rewriting, and cleaning) works as expected. I noticed the resulting file (”c3c70a083634f0662813af42ee6372eb.jpg” in this case) seemed to be a little large in file size, so I downloaded it back to my mac through ftp to take a closer look at it.

It turns out that the jpeg I uploaded was no longer a jpeg after the upload process, it was now a gif, even though the name kept the .jpg extension on my server (note: in the finder, it shows up as a jpeg, but checking the properties in preview shows it as a gif - the file size confirms that preview is probably right). I’ve tried this on two different installs on two different systems, and I get the same result. The images resized with the Gallery Module do not do this, so my best guess is that it might be something to do with the files extension.

Any ideas from anyone on this one? Obviously, I’d like to get it figured out, for image size if nothing else. If there are any other settings that would be helpful to let you know about, let me know, I’m just not really sure where else to go from here.

Thanks in advance.

Update: I see that this was mentioned (sort of) on the previous page, but it was thought to be caused by jpeg quality settings. I’m not sure if that is the case or not. It seems like the mime type is changing somehow.

       
Jacob Fentress's avatar
Jacob Fentress
37 posts
17 years ago
Jacob Fentress's avatar Jacob Fentress

One more observation. (I wanted to wait until I heard about the image saving thing first, but I’ll go ahead)

When I have the extension enabled, an error is thrown if I try to create a new upload destination. The error I get is:

MySQL ERROR:

Error Number: 1064

Description: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

Query: SELECT * FROM exp_mh_file WHERE upload_id=

Update: Well, I see this has already been mentioned by several folks. Sorry to bring it up again.

       
Eric Snyder's avatar
Eric Snyder
202 posts
17 years ago
Eric Snyder's avatar Eric Snyder

Mark:

Very much appreciated the upload file extension. EE is great but file upload is sorry. This goes a long way.

I am getting the error:

MySQL ERROR: Error Number: 1064 Description: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ” at line 1 Query: SELECT * FROM exp_mh_file WHERE upload_id=

When I try to add a new upload directory.

       
benpowell's avatar
benpowell
29 posts
17 years ago
benpowell's avatar benpowell

Posting this in case it helps anyone.

I had a problem using 3.1.0 where I wanted to set a limit on the upload folder of 800px by 600px. If an uploaded image exceeded these dimensions I wanted an error to be returned and if the image was within these dimensions I wanted the image uploaded without being resized. I set up the upload folder and the maximum width/height and set Resize Images to Do Not Resize. When I uploaded an image that was within the maximum width/height it got stretched to 800 x 600 pixels. I managed to fix this by changing:

//  Stretch Images, Happens By Default!
//  =============================================
else
{


}

to

//  Stretch Images, Happens By Default!
//  =============================================
else
{
$dst_width = $src_width;
$dst_height = $src_height;
}
       
timkelty's avatar
timkelty
177 posts
17 years ago
timkelty's avatar timkelty

I’m having trouble with the image resizing… I’m running EE 1.6.1 with File 3.10, I’ve tried 3.00 with the same result.

If I specify a max width or height and a resizing method, when I submit an entry with a file the browser just hangs and goes to a blank screen.

The url of the white screen is: index.php?S=adc1d0a74086ff6edd98b741eb65a6fdcdd51180&C=publish&M=new_entry The image ends up getting uploaded, but no thumb is generated.

If I change method to ‘do not resize’ it works as expected.

I’m resizing with ImageMagick and thumbnail generation works fine with the normal EE upload method, so I’m not sure what’s causing it.

Any help would be much appreciated!

       
benpowell's avatar
benpowell
29 posts
17 years ago
benpowell's avatar benpowell
If I specify a max width or height and a resizing method, when I submit an entry with a file the browser just hangs and goes to a blank screen.

@timkelty - I had a similar problem with multiple file fields. I think it was due to the amount of processing PHP was doing and what worked for me was increasing the memory_limit setting in php.ini. You could try uploading a really small (20Kb) image and see if this works - if it does then it’s probably your PHP settings not being able to cope with the size of images your uploading.

       
timkelty's avatar
timkelty
177 posts
17 years ago
timkelty's avatar timkelty

@benpowell I tried a 3KB image and still had the same issue.

       
Ryan M.'s avatar
Ryan M.
1,511 posts
17 years ago
Ryan M.'s avatar Ryan M.
MySQL ERROR: Error Number: 1064 Description: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ” at line 1 Query: SELECT * FROM exp_mh_file WHERE upload_id=

I’m getting this exact same error (as Eric Snyder, above) when I try to add a new upload directory. Not sure what to do…but I do have to add another directory or two. Hmm!

UPDATE I see that jtnt’s comment from above is sort of hidden. Apparently to ad a new File upload Destination with File 3.1.0 installed, one has to:

Using build EE 1.6.1 20071114 and File v 3.1. I got around it as well by disabling the extension and making the directory, then re-enabling it.
       
james Brown's avatar
james Brown
492 posts
17 years ago
james Brown's avatar james Brown

Maybe I’m totally missing this, but how do you set the thumbnail sizes? In 2.x.x it was in the extension settings. but there isn’t extension settings anymore.

       
timkelty's avatar
timkelty
177 posts
17 years ago
timkelty's avatar timkelty
Maybe I’m totally missing this, but how do you set the thumbnail sizes? In 2.x.x it was in the extension settings. but there isn’t extension settings anymore.

You set the max height and width in the File Upload settings for whatever location you assigned the field. For me, this brings me to a blank white screen when I try to publish, even though resizing with the built in ‘FIle Upload’ pop up works fine. Let me know if it works for you.

       
james Brown's avatar
james Brown
492 posts
17 years ago
james Brown's avatar james Brown

i understand that… but that setting just sets the max width and height for the full size image. i want to know how you set the max width and height for the thumbnail image.

       
Dane Thomas's avatar
Dane Thomas
139 posts
17 years ago
Dane Thomas's avatar Dane Thomas

I came across this today - just another option in developing the upload meter a little further - http://aariadne.com/uploadform/

In the current version I still don’t seem to be getting the current upload indication bar.

       
james Brown's avatar
james Brown
492 posts
17 years ago
james Brown's avatar james Brown

anyone know how to set THUMBNAIL sizes with the 3.1 release?

       
Ryan M.'s avatar
Ryan M.
1,511 posts
17 years ago
Ryan M.'s avatar Ryan M.

I don’t think you can set the thumbnails. Why don’t you use something else to generate the thumbnails on the templates like Imagesizer (plugin) or phpThumb (3rd party script)?

       
timkelty's avatar
timkelty
177 posts
17 years ago
timkelty's avatar timkelty

Based on the documentation, I assumed the thumb dimensions were set by whatever you set as the Max Width/Height for that upload destination:

Resize Images? [auto/crop/anchor_width/anchor_height/stretch/no] — Controls how images are resized (if at all). Auto — Requires Max Width & Max Height. Will fit the uploaded image within the size specified by Max With and Max height.

But I guess maybe I’m misunderstanding this…note that I haven’t gotten this to work, when I set a resize method and max height/width it freezes on posting (white screen).

       
First 21 22 23 24 25 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.