Check file size of photos using Javascript

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • tgundeck

    #1

    Check file size of photos using Javascript

    Does anyone know how I can check the file size of photos or any file
    type in JavaScript? I'm allowing users to store photos in my web page
    using the input type = file tag, but need to limit the photo size to 1
    meg. I would like to check the file size in JavaScript on the page,
    instead of on the server. Anyone know how I can check the file size in
    JavaScript?

  • Evertjan.

    #2
    Re: Check file size of photos using Javascript

    tgundeck wrote on 22 mrt 2005 in comp.lang.javas cript:
    [color=blue]
    > Does anyone know how I can check the file size of photos or any file
    > type in JavaScript? I'm allowing users to store photos in my web page
    > using the input type = file tag, but need to limit the photo size to 1
    > meg. I would like to check the file size in JavaScript on the page,
    > instead of on the server. Anyone know how I can check the file size in
    > JavaScript?
    >[/color]

    As this has to be done serverside better ask an ASP NG.

    Yes ASP can do javascript serverside.

    --
    Evertjan.
    The Netherlands.
    (Replace all crosses with dots in my emailaddress)

    Comment

    • Papajo

      #3
      Re: Check file size of photos using Javascript

      Here is a tool I built for "webtv" don't know if it will work for PCs,
      it will give you file size of images and webpages. It's written in perl,
      not javascript.
      If your interested let me know and I'll give you the txt file for
      script. Papajo



      Comment

      Working...