<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>I have a controller subclassed from&nbsp;Catalyst::Controller::REST.</div><div><br></div><div>Most of my methods are happily ActionClass('REST')'d, but I have one where I want a file to be uploaded and NOT</div><div>deserialized. Even if I did not include the ActionClass attribute, I would get a complaint about no deserialization method for the upload.</div><div><br></div><div>I couldn't figure out how to do it, so I backed out the RESTness from the controller and implemented a "straight" put method:</div><div><br></div><div>sub xxx :Local :Args(0) {</div><div>&nbsp;&nbsp; &nbsp;my ( $self, $c ) = @_;</div><div><br></div><div>&nbsp;&nbsp; &nbsp;return if $c->request->method ne 'PUT';</div><div><br></div><div>&nbsp;&nbsp; &nbsp;my $filecontents = '';</div><div>&nbsp;&nbsp; &nbsp;</div><div>&nbsp;&nbsp; &nbsp;my ($fh) = $c->request->body;</div><div>&nbsp;&nbsp; &nbsp;while ( my $line = &lt;$fh> )</div><div>&nbsp;&nbsp; &nbsp;{</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;$filecontents&nbsp;.= $line;</div><div>&nbsp;&nbsp; &nbsp;}</div><div>&nbsp;&nbsp; &nbsp;</div><div>.... do something with it ...</div><div><br></div><div>&nbsp;&nbsp; &nbsp;$c->response->status('202');</div><div>&nbsp;&nbsp; &nbsp;$c->response->body( "stuff accepted" );</div><div><br></div><div>}</div><div><br></div><div>Is there a way to declare some paths as NOT subject to deserialization? The reason I ask is that I want it for most everything...just not for a few paths.</div><div><br></div><div>(Incidentally, am I doing the right thing to get the file contents? It seems to work and I can't find any other doc/pointers)</div><div><br></div><div>FWIW I was using curl to test it:</div><div><br></div><div>curl -T somefile &nbsp;<a href="http://localhost:3000/demo/xxx">http://localhost:3000/demo/xxx</a></div><div><br></div><div>Thanks very much!</div><div><br></div><div>Bruce</div><div><br></div><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>---</div><div>Bruce McKenzie</div><div><a href="mailto:brucem@dynamicrange.com">brucem@dynamicrange.com</a></div><div><br></div></div></span><br class="Apple-interchange-newline"> </div><br></body></html>