I was working on " Potrait View " in ACS TCL. In the core, it uses db_write_blob to display a picture. But I saw some postings on openacs bboard that db_write_blob locks the database handle till the blob data is fetched from the database, written to a file and that file is displayed as an image. So if the internet speed is slow then it can cause problems.
The better solution is after getting the blob from the database, release the handle and then write to a file which can be displayed as an image.
I used db_0or1row to get the blob data in my tcl file and then open a file ( [open tmp_file w] ) in write mode. Then I put the blob data in the file using "puts" command. After the data is written to the file, I used ns_returnfile to display the file.
Here I am getting just a blank page. I checked ns_returnfile with a static image existing on my hard disk and it works fine. So the problem is while putting the blob data in the file.
Looking for some comments on it.
Request notifications