Results 1 to 4 of 4

Thread: Size of file on domain

  1. #1
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default Size of file on domain

    Is there a way to get the size of a file with javascript, if it makes a difference it would be on my domain? Similiar to the filesize of php, I can't use the php function because the file is uploading.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    As far as I know, this is only possible in IE and only for images. Even in IE though, I believe the file must be complete before its size 'property' can be accessed.

    However, (not being much of a PHP person) I imagine that there must be at least a few plug ins or existing code for PHP that might even allow for a progress bar of sorts for this sort of thing. They may also involve AJAX and javascript perhaps (to allow for near real time rendering), but the information on the status of the upload in progress should at least be available on the server side.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    bluewalrus (10-22-2009)

  4. #3
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Oh, okay. All the php solutions I've found say to get the 2 locations, the temporary file location, and the file's destination location and compare the size of them while the upload is occuring. Maybe someone could shift this to the php forum and I could see if anyone there knows a way to go about this? Thanks.

  5. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I see no one has responded yet. I did a Google that looks promising:

    http://www.google.com/search?client=...utf-8&oe=utf-8
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •