UnitedForums - UK Web Hosting Forum UnitedHosting Community Hosting Forums
Network and Server StatusCustomer SupportUK Web Hosting
UnitedHostingUnitedHosting Sitemap UK Hosting ForumUK Web HostingWeb Hosting ForumsUK Reseller HostingWeb Host CommunityUK Managed Dedicated ServersHosting Help and SupportUK Domain Name Registration

Go Back   UnitedForums.co.uk > UnitedHosting Community > Website Development & Scripting

Reply
 
Thread Tools Rate Thread Display Modes
Old 30th June 2008, 02:11 PM   #1 (permalink)
wmuckell
Senior Member
 
wmuckell's Avatar
 
Join Date: May 2004
Location: Marden, Kent
Posts: 179
Image uploads too Large

I have an application that allows people to upload details of adverts to my site, with 3 images.

However many people are ignoring the MAX SIZE warning and trying to upload MASSIVE 3MB files instead of resizing them first.

I know I can probably resize the image on upload, but I am not sure that is the correct direction I want to go in. I would prefer to Stop people doing it in the first place. If I let people upload 3 X 3mb images via a form, it will firstly take ages, then the resize will also take ages and I am not sure it will work either.

Does anyone have any other ideas, or do I have to go down the Image Resize direction with something like ImageCopyResampled
wmuckell is offline   Reply With Quote
Old 30th June 2008, 10:58 PM   #2 (permalink)
percepts
Senile Member
 
percepts's Avatar
 
Join Date: Mar 2005
Posts: 1,009
My previous post was wrong as I just found out with some more testing.
__________________
An old dog learning new tricks
percepts is offline   Reply With Quote
Old 22nd July 2008, 10:52 AM   #3 (permalink)
wmuckell
Senior Member
 
wmuckell's Avatar
 
Join Date: May 2004
Location: Marden, Kent
Posts: 179
I still have a major issue with this that my client is getting very irritated with.

At certain times of the day, the ones that I expect are busiest on the internet. An application I have which uploads images to the server and resizes them timesout and the script does not complete.

I think it is when there are large files involved, e.g. 3 X 3MB and the form has to submit the files to the server before the script can even run to resize them.

They just get an Internet Explorer cannot view this pages.

Have other people run into issues like this and did they find neat solutions. Or do they simply have to go to a dedicated server to get full performance. Which is an expensive solutions.
wmuckell is offline   Reply With Quote
Old 23rd July 2008, 11:02 AM   #4 (permalink)
Terra
Registered User
 
Terra's Avatar
 
Join Date: Oct 2005
Location: old cottage
Posts: 945
it's not something as simple as running out of max_memory? If you resize very large images (especially if there are multiples), the script will need quite a bit of max_memory to complete. I've had this issue when resizing 4 large images into thumbnails via a PHP script.

You could contact UH & see what you're max_memory is, and whether there's any room to increase (maybe just temporarily to see if the problem can be isolated).

The other thing to watch out for is browser time-out (which would be set in the visitor's browser settings). If a script takes too long to respond, the browser time-out will kick in and display a "site takes too long to respond" or similar message. The solution for that would be to split the script into chunks & resend bits to the browser (e.g. updates such as "1st image uploaded ..... 2nd images uploaded .. ") with browser refresh so the time-out doesn't kick in.
__________________
Underground, Overground, Wombling Free!

Last edited by Terra : 23rd July 2008 at 11:05 AM.
Terra is offline   Reply With Quote
Old 23rd July 2008, 11:09 AM   #5 (permalink)
wmuckell
Senior Member
 
wmuckell's Avatar
 
Join Date: May 2004
Location: Marden, Kent
Posts: 179
thanks terra for the reply. How would you suggest sending in chunks if the whole form is submitted using one form. People are stupid enough without giving them several steps to undertake.
wmuckell is offline   Reply With Quote
Old 27th July 2008, 11:11 PM   #6 (permalink)
ozsan
Registered User
 
Join Date: Feb 2003
Location: Sydney Australia
Posts: 159
Send a message via Yahoo to ozsan
I run a photo resotration business and have the same problem with image sizes. As you can imagine a large file is an advantage for me in the process of restoration and customers often have problems uploading them to my site. I'm at the stage where I have to look off site for uploads, I.m in the process of researching sites that don't cost a fortune and that I can intergrate into my site. I can't afford a dedicated server here at UH. The one I'm currently looking at is Sendspace hopefully this is a workaround that will get me out of trouble.
__________________
Photo Renovate
We care about your precious
Memories as much as you do.
ozsan is offline   Reply With Quote
Old 29th July 2008, 11:08 PM   #7 (permalink)
fluxman
Registered User
 
Join Date: Nov 2005
Posts: 123
isn't there some kind of program to upload any sized file in chunks or something? Maybe in Flash or Java?

I'm always having image resize problems, but just tell everyone to make sure it's fairly small and compressed before uploading.
fluxman is offline   Reply With Quote
Old 30th July 2008, 12:10 AM   #8 (permalink)
ozsan
Registered User
 
Join Date: Feb 2003
Location: Sydney Australia
Posts: 159
Send a message via Yahoo to ozsan
I'm sure there is a program to do this but I don't have the expertise or time to go that way that's why I need an easy solution.
__________________
Photo Renovate
We care about your precious
Memories as much as you do.
ozsan is offline   Reply With Quote
Old 7th August 2008, 07:13 PM   #9 (permalink)
percepts
Senile Member
 
percepts's Avatar
 
Join Date: Mar 2005
Posts: 1,009
I just came across this which I think is just what you are looking for. However, the documentation is not clear on when the filesize limit kicks in. But saying that, I have just checked the flash documentation and it does indeed allow you to access the filesize which javascript doesn't, so theoretically it should be able to check the size before the upload actually begins.

You will however need to do a little javascript coding to make it handle the size limit events you create.

SWFUpload News | SWFUpload
__________________
An old dog learning new tricks
percepts is offline   Reply With Quote
Old 7th August 2008, 08:33 PM   #10 (permalink)
skifreak
Registered User
 
skifreak's Avatar
 
Join Date: Nov 2004
Location: Inverness
Posts: 36
GD2 can't handle images of more than about 600k (might be less or more depending on jpeg quality/pixel size). Set a limit and if the files are bigger than that then use ImageMagick - this will work up to whatever the upload limit is.

That doesn't help if the script is timing out waiting for the upload obviously!
__________________
Scottish Snow: www.winterhighland.info
skifreak is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT. The time now is 09:05 PM.

UK Web Hosting  |  UK Reseller Hosting  |  UK Dedicated Servers UnitedHosting  |  UnitedSupport  |  UnitedForums  |  SEO by vBSEO 3.0.0
Copyright © 1998-2008 United Communications Limited. All Rights Reserved. Registered in England and Wales 3651923 - VAT Reg No. 737662309