Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread Slightly OT: Storing files in database / How to view
Mon, Feb 16 2009 10:29 PMPermanent Link

"Adam H."
Hi,

One of my clients is wanting to store files in the database against certain
records. I'm just going to load the binary files (regardless of content
type) into a BLOB field and all should be right.

I've managed to get the loading and saving part of my application down pat,
but are having problems trying to decide which way I should go when viewing
the files...

I thought about saving / extracting the file to a temporary location but the
problem I face is that if the file is say a word document, the user may
assume they can edit the file then and there, and make changes, etc to it
and of course, the changes would be lost.

I've thought about saving / extracting the file to a temporary location and
then making the file readonly, but then face problems about the file being
deleted afterwards, or when to delete the file. (as the application wont
know when the user has finished with the file)...

I've thought about saving / extracting the file to a temporary location and
afterwards checking to see if the file has changed, and prompt the user
whether or not to upload the changes to the database, but once again face
problems not knowing when the user will be finished with that file.

I was wondering if there was a standard, or if anyone could recommend the
best way to handle this situation. I think in almost all cases the files
will be read / viewed / executed only without changes but just wanted to do
the most I could to stop potential 'accidents' from happening.

Cheers

Adam.
Tue, Feb 17 2009 3:10 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Adam


I just go with the open as a temp file, shellexecute to open and if they alter it - tough. Years ago I did buy a file viewer (QuickView I think) but decided to abandon the approach to stay legal and because the file specs were changing faster than the tool.

Roy Lambert
Wed, Feb 18 2009 6:35 AMPermanent Link

"Frans van Daalen"

"Adam H." <ahairsub5@jvxp_removeme.com> wrote in message
news:B07B03C1-2D7E-4B4B-BDDC-93D51ED261EC@news.elevatesoft.com...
> Hi,
>
> One of my clients is wanting to store files in the database against
> certain records. I'm just going to load the binary files (regardless of
> content type) into a BLOB field and all should be right.
>
> I've managed to get the loading and saving part of my application down
> pat, but are having problems trying to decide which way I should go when
> viewing the files...
>
> I was wondering if there was a standard, or if anyone could recommend the
> best way to handle this situation. I think in almost all cases the files
> will be read / viewed / executed only without changes but just wanted to
> do the most I could to stop potential 'accidents' from happening.
>
> Cheers
>
> Adam.
>

Writing an embedded file system  :
http://17slon.com/blogs/gabr/2006/09/writing-embedded-file-system.html  Smile

Wed, Feb 18 2009 11:30 PMPermanent Link

"Adam H."
Hi Guys,

Thanks for your replies. I think I"ll go with Roy's approch for the time
being as I've pretty much implemented the storage, etc of the files
already - was just trying to watch out for any gotcha's with the viewing.
Smile

Cheers

Adam.
Image