Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

restricting file upload size

New Here ,
Mar 04, 2007 Mar 04, 2007

Copy link to clipboard

Copied

How do i restrict file upload size in pixels

this is what i have at the moment

File.MaxSize = 1024*1024
TOPICS
Server side applications

Views

421
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 04, 2007 Mar 04, 2007

Copy link to clipboard

Copied

Where do you have that?

--
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com - Template Triage!
http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs, Tutorials & Resources
http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
==================


"rob dalton" <webforumsuser@macromedia.com> wrote in message
news:esfhlo$e6q$1@forums.macromedia.com...
> How do i restrict file upload size in pixels
>
> this is what i have at the moment
>
> File.MaxSize = 1024*1024


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 04, 2007 Mar 04, 2007

Copy link to clipboard

Copied

Well I am guessing that is where you would set the max file size, with the script you are using. You basically asnwered your own question.

Also, I just double read your post, and you cannot restrict a file based on pixels, you can only restrict a file on file size.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 04, 2007 Mar 04, 2007

Copy link to clipboard

Copied

right, my site only displays files 350 x 250 pixels. I dont want people uploading hugh files to the server, what size restriction would you recomend i set it to,

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 04, 2007 Mar 04, 2007

Copy link to clipboard

Copied

"rob dalton" <webforumsuser@macromedia.com> wrote in message
news:esfhlo$e6q$1@forums.macromedia.com...
> How do i restrict file upload size in pixels

The only foolproof solutions rely on server-side scripting. Client-side
validation for image dimensions can help. but it doesn't works across all
browsers. See the sample below and check the notes for browser
compatibility:
http://www.massimocorner.com/validator/samples/image_upload.htm

Hope it could help


--
----------------------------
Massimo Foti, web-programmer for hire
Tools for ColdFusion and Dreamweaver developers:
http://www.massimocorner.com
----------------------------


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Mar 05, 2007 Mar 05, 2007

Copy link to clipboard

Copied

LATEST
You could just set your image placeholder on the page where the picture will be displayed to 350x250, but this can lead to problems if someone uploads a big file, and if the image isn't dimensionally equal you will get image distortions..

Another approach is to write, or find, a script that would resize the image when it gets uploaded. That would ensure that the image will fit perfectly within your design.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines