For an in-development project, we've been trying to associate files committed using POST calls to endpoint/file to a file field on a Node with little success. Regardless of whatever information is sent to the node, whether it is verbose or limited, the node will respond with a 200, but nothing is saved in the file field.
For example, this JSON is used in a POST request to a node to define both the node with a File ID defined earlier
{
"type":"test_with_text_field",
"title":"Test with File",
"field_file":{
"und":{
"fid":"93"
}
}
}
Instead, it returns a 200 and a new node but no changes are ever made to the file field. Attempting this with other POST and PUT calls, with settings for all the possible attributes exposed in the field still return the same result. It also returns a "Notice: Undefined offset: 0 in file_field_widget_form()." error with a lengthy stack trace I will spare you (but I can make available at request). This was tested using Services 7.x-3.x
Comments
Comment #1
kylebrowning commented#1433254: Node.update and user.update ignores new files