How can I PUT a new file to a node using services 3 without overwriting the existing file?

drupal.stackexchange https://drupal.stackexchange.com/questions/23469

  •  30-10-2019
  •  | 
  •  

Using Services 3 I have it working fine to add a file using

endpoint/file
{"uid":"1","filesize":"99999","filename":"whatever.bin","file":"BASE64_ENCODED_DATA"}

and also to add a node with that file using

endpoint/node
{"title":"testrest1","type":"dl","field_dl_file":{"und":[{"fid":582}]},"uid":"1","language":"und"}

But how can I add a new file to the node? When doing PUT

endpoint/node/999 
{"field_dl_file":{"und":[{"fid":999}]},"uid":1,"language":"und"}

It just overwrites the existing file. Trying to POST gives a whole bunch of errors.

没有正确的解决方案

许可以下: CC-BY-SA归因
scroll top