Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Website Design Forum


You are currently viewing our Website Design Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Possible to let the user know the image is too large
Old 01-19-2007, 03:49 PM Possible to let the user know the image is too large
Junior Talker

Posts: 3
Trades: 0
Technically I do not think its possible but thought I would ask. I have a form that contains multiple image upload fields, in the description we ask that the images size be smaller than 1mb but most people simple do not know how to check this.

Typically people will load each of the 5 image fields with an image over 2mb and wonder why the page timed-out or is blank after a couple of minutes.

Can PHP or something check this before the form gets rolling, then warn them about the size or time it will take to load these images?
Nori M is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-20-2007, 05:50 AM
Elemak's Avatar
$1,000 - $4,999 Monthly

Posts: 164
Trades: 0
It is not possible to look at the file on the client's hard drive before it is uploaded (which you would need to do to determine the size).

The only solution I can think of is to use an uploading script that instead of timing out the page, will abort the upload if it takes too long and then warn the user that their image was probably too large. I do not know of any such scripts however.

Most sites don't worry about the timing out, and just check the file size AFTER it is uploaded.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
Elemak is offline
Reply With Quote
View Public Profile Visit Elemak's homepage!
 
Old 01-20-2007, 09:39 AM
Novice Talker

Posts: 5
Location: Chennai India
Trades: 0
Unless you create a custom activex or java upload utility it is not possible to know the size if the file before the actual upload is completed.

Reading the uploaded headers and binary data and stopping midway once a particular size is reached is also another option but complicated
__________________
Chris, Director, Chrisranjana.com

Please login or register to view this content. Registration is FREE
chrisranjana is offline
Reply With Quote
View Public Profile Visit chrisranjana's homepage!
 
Old 01-29-2007, 05:26 PM
roeinstein's Avatar
Junior Talker

Posts: 6
Trades: 0
Check out the GD libraries for PHP. Do a google search for 'php-gd'
__________________
Lee's Design Guy (see:
Please login or register to view this content. Registration is FREE
and
Please login or register to view this content. Registration is FREE
)
roeinstein is offline
Reply With Quote
View Public Profile Visit roeinstein's homepage!
 
Old 01-29-2007, 05:35 PM
Junior Talker

Posts: 82
Trades: 0
This is totally possible. let the user upload the file, run a script nad if the file is > 1mb delete the file from the server and send the user to an error page saying "YOU EEEDIOT!"
dprundle is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Possible to let the user know the image is too large
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.25491 seconds with 12 queries