Re: File Upload and Download Questions..
Re: File Upload and Download Questions..
- Subject: Re: File Upload and Download Questions..
- From: "Jonathan 'Wolf' Rentzsch" <email@hidden>
- Date: Sun, 21 Mar 2004 00:03:00 -0600
James Cicenia, email@hidden, wrote:
>I need to create a document repository for my application. Users of my
>application will be allowed to upload documents for later retrieval.
>These
>documents will most likely be, PDFs, EXCEL, Word, Text, etc.
>
>Each client of my application should only be able to see their documents
>and they of course must be protected. Do I store my documents in my
>mySQL database? Do I store them on my server? If so, I will need to
>create
>a distinct directory for each client. This should be done automatically
>upon
>setup. What would you do?
This comes up on a semi-regular basis, check the omnigroup archives for
the epic back-and-forth battles.
I think it boils down to your project specifics. For example, I
successfully vended multimegabyte ebooks via WO4.5, over the Java bridge,
from FrontBase. It's faster to get EOF+your DB handle the files than
writing your own code to handle the file system interaction code.
That said, if your database doesn't handle BLOBs with aplomb (FrontBase
does, I don't think MySQL does [but I'm unsure on that point]) and/or
you're expecting large files (I'd say 5-10MB is the realistic EOF
cutoff), then you should probably roll your own file-system based design.
>The idea of the database seems the easiest but
>would I have to pull the data via a "raw" row fetch?
No, but that might help efficiency.
>Doesn't see right
>to load
>an EO object with the blob in it... or do I make a related table with
>just the blobs
>that I raw fetch while keeping the reference in a separate table which
>can
>easily load into an EO?
The "standard" high-level-EOF+BLOB pattern is to have a separate BLOB
entity for your "normal" entities. That way roundtriping the database is
cheap until you actually want the payload (and fire the normal
entity->blob relationship fault).
| Jonathan 'Wolf' Rentzsch http://rentzsch.com
| Red Shed Software http://redshed.net
| "better" necessarily means "different"
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.