[Zope] inserting file into external db

Corbett Waddingham corbettw@yahoo.com
Thu, 14 Jun 2001 11:12:57 -0700 (PDT)


64k is actually sufficient for most uses. Once this is out of testing
and goes into production, the column will likely be changed to a
MEDIUMBLOB, but that shouldn't be an issue at this point. Thanks for
pointing that out, though.

So it sounds like the problem lays somewhere in how Zope is initially
loading the file. Any pointers for more information? Or should I set
this aside and go read up on Python for awhile before starting again?

Again, thanks for your tips.

Cory

--- Andy Dustman <andy@dustman.net> wrote:
> On Thu, 14 Jun 2001, Corbett Waddingham wrote:
> 
> > 1) I'm using ZMySQLDA 1.3.3. According to the link you provided,
> the
> > latest version is 2.0.7. I'll check with the person who installed
> it to
> > see why the older version was put in.
> 
> Another thing to check into it is: What version of MySQL are you
> using on
> the client and server side?
> 
> > 2)The test files I'm using are all MS Word docs and they are being
> > output as garbage (mostly \0 with various Unicode characters).
> 
> How is that different from a normal MS Word document? (at least
> half-serious here...)
> 
> > 3) DOC_FILE is a Blob. I also tried Text, but that ends up storing
> the
> > following: <ZPublisher.HTTPRequest.FileUpload instance at 88315e8>
> (or
> > something like it, the reference number at the end changes).
> 
> You probably do want a blob, since it's (at least potentially) binary
> data, but using a TEXT column should not produce what you saw. That's
> some
> other problem with your DTML. <ZPublisher.HTTPRequest.FileUpload
> instance
> at x> is the result of the repr() function in python, instead of
> str().
> Also note that a normal MySQL BLOB will only hold 64KB. You may need
> to
> use MEDIUMBLOB (up to 16 MB) for something as large as a MS Word
> document...
> 
> -- 
> Andy Dustman         PGP: 0xC72F3F1D
>     @       .net     http://dustman.net/andy
> "I'd rather listen to Newton than to Mundie. He may have been dead
> for almost
> three hundred years, but despite that he stinks up the room less." --
> Linus T.
> 
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )


__________________________________________________
Do You Yahoo!?
Spot the hottest trends in music, movies, and more.
http://buzz.yahoo.com/