[web-devel] Yesod, picture uploading, storing, rendering
acheshkov at gmail.com
Sun Jun 26 12:40:29 CEST 2011
i have started to deal with file uploading and found several problems
1. The Yesod restricts file upload for non-small files http response
is *Status: 413
Request Entity Too Large. *
* *How can change this ?
2. Yesod does not recognize file uploding via XHR. The *runRequestBody
returns the empty files list.
How to see the uploading file content ?
2011/6/22 Michael Snoyman <michael at snoyman.com>
> In general, the recommended approach is to store binary files on the
> filesystem instead of in the database. In the Yesod wiki, I violate
> that :(. It's significantly more complicated than what you're looking
> for, since it's parsing an entire ZIP file and pulling out
> DITA-formatted XML, but you can look at the relevant file:
> Note that I currently base64-encode the content since HDBC-postgresql
> has problems with binary data. I'm hoping that gets resolved (or that
> we move over to Chris's new PostgreSQL library).
> On Wed, Jun 22, 2011 at 7:34 PM, Anton Cheshkov <acheshkov at gmail.com>
> > Hi Michael,
> > please tell about the best way you see to upload store and render
> > in the Yesod application.
> > How is better to store the pictures either file system or DB.
> > It would be great to see the code example shows how to upload store and
> > render just uploaded pictures with Yesod.
> > I think you have something like this already.
> > Thanks.
> > --
> > Best regards,
> > Cheshkov Anton
Phone: +7 909 005 18 82
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the web-devel