1

to restate the title, CouchDB requires PUT for adding an attachment to document, but AppMobi.file.uploadToServer() does a POST. CouchDB returns:

{"error":"method_not_allowed","reason":"Only DELETE,GET,HEAD,PUT allowed"}

I have verified that this is how CouchDB expects it. I was using uploadToServer to attach an image to a document. All the CouchDB documents are so-called JSON documents, so any images have to be attachments to an existing document. I wiresharked the communications and read about uploadToServer and it's definitely doing a POST. Is there any way I can modify this to a PUT?

Thanks.

JustTrying
  • 764
  • 6
  • 11
  • I see that one can modify the method for many web servers (including CouchDb) by adding the X-HTTP-Method-Override header, and setting it, in my case to PUT. Unfortunately I cannot see any method to add a header to the request that uploadToServer() will make. Any ideas? Thanks. – JustTrying Feb 07 '13 at 23:21
  • 1
    For those interested, relevant follow up to this question may be found at [http://forums.appmobi.com/viewtopic.php?t=3493](http://forums.appmobi.com/viewtopic.php?t=3493) – JustTrying Feb 14 '13 at 17:00
  • This sort of thing wouldn't be appMobi anymore since they sold some of their assets to Intel. Now check out http://html5dev-software.intel.com/. There's no issue on the forum related to this yet. – JustTrying Mar 11 '13 at 16:50

0 Answers0