Any examples of using PowerNAP to process image file uploads?

4 views
Skip to first unread message

Eric Knipp

unread,
Mar 17, 2009, 12:14:56 AM3/17/09
to cfrest
I've successfully used PowerNAP for GET operations, but I'd like to
add a POST handler that will accept multipart form data, which will
include an image file and some other attributes.

I'm not sure how to do this, though. Any help would be appreciated.

Brian G

unread,
Mar 17, 2009, 12:30:21 PM3/17/09
to cfrest

On Mar 16, 9:14 pm, Eric Knipp <eric.kn...@gmail.com> wrote:
> I've successfully used PowerNAP for GET operations, but I'd like to
> add a POST handler that will accept multipart form data, which will
> include an image file and some other attributes.

Eric,

I haven't done this yet but I believe it's simple. Basically, create
a CFHTTP client that reads in a file and submits it as the body of a
PUT/POST and set the content-type to be multipart. In PowerNap, you
can get at the body using the arbitrarily-named arguments.resource.
You should be able to write that out as a file using CFFILE or do
whatever else you need with it.

Let me know if that works,


Brian
Reply all
Reply to author
Forward
0 new messages