Hi Henner,

I will try to investigate on that this week. I think that it would be reasonable to avoid any usage of FileHolder object in the new blob mode
as it doesn't need any serialization. File name, mime type (and perhaps some other properties) could be stored with the help of BlobInterceptor, but, however, I think that file name shouldn't be a requirement to make file uploads work in the new blob mode.


What I need is to have the possibility to edit (with a textarea tag) as well as to use a file upload for the blob column in the database. IMHO it would be sufficient to have DbTextAreaForBlobs and/or DbBlobContent tags working and to solve the problems with object serialization and the storage of the file's properties.

What do you think? Any comments are appreciated :)

Btw, I've discovered the problem with charsets while doing bytes -> characters conversation. Everything works correct in Windows, but in Linux some characters (windows-1257 character specific quotes) are written to the database incorrect. I tried to feed Tomcat with different LC_ALL and LANG settings but it didn't help. I guess it could also be a bug in JDK (1.4.2_05), but maybe there is a way to define a "sytem default" charset somewhere in ApplicationResources.properties? We could then pass the parameter into Readers's or Writer's constructor something like:

BufferedReader br = new BufferedReader(new InputStreamReader(blob.getBinaryStream(), getCharset()));

regards,
Dziugas Baltrunas

Henner Kollmann wrote:

Hi Dziugas,

Just inserted your patch... But there is missing the handling of classic
blob support.
And the routines of in the fileservlet class are nearly the same.
Would it not better to move the retrieving code into the SqlUtil class - for
all three versions (file mode, blob classic mode  and new blob mode)?

Could you do this (and test it)?

Thanks very much,
Henner,


-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
DbForms Mailing List

http://www.wap-force.net/dbforms

Reply via email to