|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
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
|
||||
|
||||
|
You are bound by the MIME settings of the user's browser.
A workaround could be to "zip" files. Hope this helps!
__________________
My blog about OpenSource Databases PDF tutorials about OSS databases, DBMonster ... Please contribute to Open Source Development, fill bug reports!!! Developer Shed eSupport Commented my.ini/my.cnf (PLEASE ADD YOUR OWN CONFIG TRICK) An introduction to database normalization Natural or Surrogate key Custom ordering for your results Correlated and uncorrelated subqueries Don't turn your outer joins into inner joins |
|
#3
|
|||
|
|||
|
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 |
|
#4
|
||||
|
||||
|
Try adding to header
response.addHeader("Content-Disposition: attachment; filename=yourfilename.here"); |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > Blob |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|