Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2002
    Location
    Argentina
    Posts
    72

    Unanswered: Save Image on Oracle from web page

    I am beginning to write some code to
    Save Image on Oracle from web page

    I am using Oracle HTTP Server

    And i have a package named MIPACKAGE with 2 procedures

    so that on my browser i type http://myserver/MIPACKAGE.SHOWPAGE

    and suposse that displays me a page with a button to submit it

    on the submit action of the page calls MIPACKAGE.MIINSERT

    and inserts the new record.

    That works fine with "normal" field types but now here comes the questions:

    Must i work with a BLOB or LONGRAW field type (images > 70K) ???
    How can i post an image on a <input> tag with type="image". ???
    Wich kind of parameter must i use on the MIINSERT procedure ???

    If you have any suggestions.'ll be longly appreciated.



    HERE IS THE PACKAGE...




    PROCEDURE SHOWPAGE (p_ImageComment in varchar2) IS

    BEGIN

    htp.print('

    ...
    ...
    ...


    <form action="MIPACKAGE.MIINSERT" name="form_main" method="post">
    <input type="hidden" name="p_ImageComment" value="' || p_ImageComment || '">
    <input name="p_Image" type="image" src="/images/MiImage.jpg">
    </form>



    ...
    ...
    ...



    ');

    END



    PROCEDURE MIINSERT (p_ImageComment in varchar2,
    p_Image in BLOB(?????) ) IS

    BEGIN



    insert into images
    (Image_name, Image)
    values
    (p_ImageComment, p_Image);

    END MIINSERT;

  2. #2
    Join Date
    Jul 2001
    Location
    NC
    Posts
    102
    I'm presently using mySQL ISAM-type tables, but I believe I can help you.

    (1) change the image format
    Some of my .BMP files are over 200 MB in size, but I've converted most to JPG format, with file sizes in the 4Mb range, and I'm converting these slowly to GIF format, where file sizes are even smaller. Smaller images mean faster displays.

    (2) reduce table size and forget BLOBS
    I keep my tables small (seeks and sorts are much faster) by NOT STORING images in the tables, but only the image's address and type. I store the images in separate directories, segregated by type.

  3. #3
    Join Date
    Oct 2002
    Location
    Argentina
    Posts
    72
    Originally posted by vududoc
    I'm presently using mySQL ISAM-type tables, but I believe I can help you.

    (1) change the image format
    Some of my .BMP files are over 200 MB in size, but I've converted most to JPG format, with file sizes in the 4Mb range, and I'm converting these slowly to GIF format, where file sizes are even smaller. Smaller images mean faster displays.

    (2) reduce table size and forget BLOBS
    I keep my tables small (seeks and sorts are much faster) by NOT STORING images in the tables, but only the image's address and type. I store the images in separate directories, segregated by type.
    Yes, i am using jpg files
    I am thinking too, to store them on a directory
    but i must solve how to transmit the image files to the server.
    any suggestion


    Thanks

Posting Permissions

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