[web-devel] Web.Encodings + Hack - Not sure what I'm doing wrong.

Clint Moore cmoore at wamboli.com
Tue May 18 01:16:16 EDT 2010


The project that I'm working on requires user image galleries.  The
idea is to allow them to upload images via a form, do some rudimentary
processing on the uploaded data and then send it directly to Amazon's
S3 service.  The problem that I'm running in to is that I can't seem
to get the binary data from the post request correctly.  When written
out to disk with withBinaryFile (hopefully thereby bypassing the new
encoding pitfalls in ghc 6.12.x), file(1) says it's 'data'.  This
seems to be happening if I push it to a new object on S3 as well.

I'm secretly hoping I'm doing something obviously wrong here.

The code in question is at http://gist.github.com/404636 .  Hopefully
it's obvious that it's way more frantic what-the-hell-is-going-on-here
code than some crackpot's idea of production ready code :)

Thanks, web-devel!


More information about the web-devel mailing list