A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Splitting LARGE images?

  1. #1
    Product Designer keyone.it's Avatar
    Join Date
    Aug 2001
    Location
    Rome, Italy.
    Posts
    1,625

    Splitting LARGE images?

    Has anybody encountered this use case?

    Photographer wants to backup & post photos on his website, in a single click.
    So we are dealing with 10+MegaByte Jpeg files.

    I'm currently running on a shared server, but a VPS could be added to the assets for this. I made some tests and the shared server doesn't seem to support such large uploads.

    What if I made a desktop app (with AIR or third party add-ons) which will do the following:

    1) backup original version.
    1.1) split the file in a series of smaller portions: into a series of smaller uploads;
    1.2) uploading all the portions;
    1.3) backend collects portions and recreates the file (or the same could be done by the desktop app upon download, removing all the logic from the server);
    2) optimize and upload online version.
    2.1) reduce size to the largest online size;
    2.2) correct colors etc...
    2.3) upload optimized version;
    2.4) backend generates other formats (preview, thumbnails etc).
    Altruism does not exist. Sustainability must be made profitable.

  2. #2
    Senior Member
    Join Date
    Jan 2001
    Location
    UK
    Posts
    149
    How are you uploading? via web form?
    Could it be done via FTP instead?

  3. #3
    Product Designer keyone.it's Avatar
    Join Date
    Aug 2001
    Location
    Rome, Italy.
    Posts
    1,625
    Oh yes, that's something I really didn't think of.
    Can Flash handle that, via AIR? Is it stable?
    Altruism does not exist. Sustainability must be made profitable.

  4. #4
    Senior Member
    Join Date
    Jan 2001
    Location
    UK
    Posts
    149
    I haven't looked at AIR at all yet so I wouldn't know.
    Have you looked into the MAX_FILE_SIZE option of the HTML input element? I have a feeling it is limited to 2mb or something by default. I think it's in bytes so the following would be limited to 10k

    Code:
    <form ENCTYPE="multipart/form-data" METHOD="post" ACTION='sendfile.php'>   
        <input type="hidden" name="MAX_FILE_SIZE" value="10000">   
        <input id='uploadName' name='fileName' type='file'>   
        <input type='submit'>
    </form>

  5. #5
    Product Designer keyone.it's Avatar
    Join Date
    Aug 2001
    Location
    Rome, Italy.
    Posts
    1,625
    I've done it all on that side.
    .htaccess modifies the PHP settings for:
    - max memory allowed.
    - script timeout.
    - max inbound file size allowed.

    But still the script just doesn't work, when I load a 12mp image, it loads the script as if no file was sent.
    Altruism does not exist. Sustainability must be made profitable.

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center