Twitter SMFHacks Facebook SMFHacks SMFHacks.com
** Home Forum Index Hacks Products Login Register Search
Welcome, Guest. Please login or register.
May 21, 2013, 11:07:14 pm

Login with username, password and session length
Members
Total Members: 10764
Latest: ozzie4x4
Stats
Total Posts: 32371
Total Topics: 5478
Online Today: 70
Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Users: 1
Guests: 57
Total: 58
+ 
|-+ 
| |-+ 
| | |-+ 
| | | |-+ 
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Can't upload images with uppercase file extensions  (Read 2358 times)
BSD2000
Community Suite Customer
Inline PM Customer
******
Offline Offline

Posts: 17


View Profile
« on: July 19, 2012, 07:05:24 pm »

I just noticed that if you select an image with a extension in uppercase, (ie; IMAGE000.JPG) the image fails to upload and you get the error message that the image file type is not supported.
It looks like after you browse to the image and select it, the case of the file extension changes to lowercase (IMAGE000.JPG changes to IMAGE000.jpg).

Is there a way to edit the accepted file types to include upper and lowercase? Where is the code located that parses the file extension and does it purposely modify the case for a reason?

This is happening on a test server running IIS v6.0 (Server 2003 OS), SMF v2.0.2, MySQL v5.5.25a, PHP v5.3.14

Thanks!
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 10995


View Profile
« Reply #1 on: July 19, 2012, 07:31:33 pm »

Just want to clarify this is for SMF Classifieds right? And if so is that when adding a picture  to a listing?
Logged
BSD2000
Community Suite Customer
Inline PM Customer
******
Offline Offline

Posts: 17


View Profile
« Reply #2 on: July 20, 2012, 10:20:47 am »

Yes and yes.
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 10995


View Profile
« Reply #3 on: July 20, 2012, 10:29:41 am »

Hmm I was able to upload on my test site without issue. I run SMF 2.0 on IIS6 windows server 2003

What is the exact message?

Can you attach the graphics that fails?
Logged
Scotchmonster
Inline PM Customer
*****
Offline Offline

Posts: 11


View Profile
« Reply #4 on: July 22, 2012, 06:49:46 pm »

I was wondering if the number of images allowed can nbe changed?
I can't seem to upload more than 5 images.
Any help is much appreciated Thank you in advance.
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 10995


View Profile
« Reply #5 on: July 22, 2012, 08:48:20 pm »

Per listing? That is a category level option. You can set the max allowed images when you edit the category.
Logged
Scotchmonster
Inline PM Customer
*****
Offline Offline

Posts: 11


View Profile
« Reply #6 on: July 22, 2012, 10:04:20 pm »

Thank you  Smiley
Logged
BSD2000
Community Suite Customer
Inline PM Customer
******
Offline Offline

Posts: 17


View Profile
« Reply #7 on: July 24, 2012, 01:54:29 pm »

I think I figured out the problem, the error message is a 'false positive' that occurs when the PHP.INI upload file size is set too low (in my case, 2MB) and the image file size being uploaded exceeds that. If I upload an image that is too large, I think the upload cuts off @ 2MB and the file looks corrupt when examined afterwards, so it reports back that the file type is invalid instead of reporting the file size was too large. In other words, it looks like the image handler can't tell if the file was too large and was cut off during the upload due to exceeding the max upload settings in the PHP.INI file.

Is there a way to test the file size before attempting the upload? Maybe report to the user that the file size is too large before attempting the upload instead of allowing the file to be cut off and corrupted after a partial upload?
Logged
SMFHacks
Administrator
Hero Member
*****
Offline Offline

Posts: 10995


View Profile
« Reply #8 on: July 24, 2012, 01:57:28 pm »

Code:
Is there a way to test the file size before attempting the upload? Maybe report to the user that the file size is too large before attempting the upload instead of allowing the file to be cut off and corrupted after a partial upload?
Not that I know of.

I do have a guide found here on how to increase the php upload limits
http://www.smfhacks.com/index.php/topic,3498.0.html
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Recent
[Today at 03:27:16 pm]

[Today at 02:20:35 pm]

[Today at 02:11:10 pm]

[Today at 01:18:58 pm]

[Today at 12:22:02 am]

[Today at 12:20:41 am]

[May 19, 2013, 11:13:02 pm]

[May 19, 2013, 08:18:27 pm]

[May 19, 2013, 07:03:27 am]

[May 16, 2013, 10:13:46 pm]
Random Picture
Donate to SMFHacks.com
Help Support the SMFHacks.com mod making.
Powered by SMF 1.1.18 | SMF © 2013, Simple Machines
TinyPortal v0.9.7 © Bloc
SMF and SimpleMachines are registered trademarks of Simple Machines. SMFHacks.com is not affiliated with nor endorsed by Simple Machines.
Page created in 1.271 seconds with 21 queries.