Thread: Blob

    #1
  1. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2002
    Posts
    26
    Rep Power
    0

    Blob


    Hi,

    I hv a Blob field in my database and another field storing the respective Content-Type..

    the Blob type keeps varying.. can be a Doc, image,xls,pdf etc...

    I need to allow users to save/download the content into their local drives...


    I am able to show it in the browser but do not want this...the users hv to save it into their local drives...

    any ideas as to how I can achieve this??

    TIA,

    sands
  2. #2
  3. Modding: Oracle MsSQL Firebird
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2001
    Location
    Outside US
    Posts
    8,527
    Rep Power
    539
  4. #3
  5. No Profile Picture
    Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2002
    Posts
    26
    Rep Power
    0
    Hi,

    I am able to output the blob content to the browser but not able to show a SAVE Dialog box to allow users to save the file...

    the relevant code is like this:

    <%
    doc = rsd.getBlob("doc"); // the field with the BLOBs...

    contype = rsd.getString("content_type");
    response.setContentType(contype);
    long index = 1;

    while(index < doc.length()){
    response.getOutputStream().write(doc.getBytes(index,100));
    index+=100;

    }%>


    there is no field with names of blobs in it... how can i set the header for this??

    thnx,
    sands
  6. #4
  7. Modding: Oracle MsSQL Firebird
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2001
    Location
    Outside US
    Posts
    8,527
    Rep Power
    539

IMN logo majestic logo threadwatch logo seochat tools logo