SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2007
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Checking a jpg file size before uploading

    Hello,

    I am wondering if this can be achieved with PHP. Can you check a jpg file size before uploading?

    I am writing a script that will limit the size of the jpg files to be uploaded by the end user. I want the script to block the upload either before or shortly after the start of the upload. I doubt it will be possible with a server side script but could it be possible with a combination of PHP and JavaScript?

    Any ideas?

    Cheers
    Luca

  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    You would need Flash/Silverlight or some HTML 5 mojo (not fully supported) either way you still need to check the file size after it is uploaded.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  3. #3
    SitePoint Enthusiast
    Join Date
    Mar 2007
    Posts
    49
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello, Thanks for the answer.. you pointed me to right direction
    I cannot use Flash/Silverlight but for sure I can use HTML5 and... in the HTML5 file API there is exactly what I want

    I guess I will have to move the thread to the HTML forum :-)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •