Project

General

Profile

Actions

Defect #10832

closed

REST Uploads fail with fastcgi

Added by Jeffrey Clark over 12 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Category:
REST API
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

Unable to upload attachments through REST API.

curl --data-binary "@README" -H "Content-Type: application/octet-stream" -X POST -u admin:test http://localhost/uploads.xml

Processing AttachmentsController#upload to xml (for 127.0.0.1 at 2012-05-04 11:52:53) [POST]
  Parameters: {"action"=>"upload", "controller"=>"attachments", "format"=>"xml"}

NoMethodError (undefined method `size' for #<Rack::RewindableInput:0x7ffb9b162fd0>):
  app/models/attachment.rb:78:in `file='
  app/controllers/attachments_controller.rb:70:in `new'
  app/controllers/attachments_controller.rb:70:in `upload'
  dispatch.fcgi:27

Rendering rescues/layout (internal_server_error)

Files

rest-upload-fastcgi.patch (716 Bytes) rest-upload-fastcgi.patch Jeffrey Clark, 2012-05-04 20:49
Actions

Also available in: Atom PDF