For a {node} when i am using "GET" for details this is the result
"field_attachment_file": {
"und": [
{
"fid": "73",
"filename": "Screenshot from 2018-06-08 12-54-20.png",
"uri": "public://Screenshot from 2018-06-08 12-54-20_2.png",
"filemime": "image/png",
"status": "1",
"type": "undefined",
},
]
}上面的"fid“是当我通过表单上传时添加的一些内容,但是当iam通过json数据上传时,我只是将"fid”增加到"74“,当我在中为同一个节点插入json时
"field_attachment_file": {
"und": [
{
"fid": "74",
"uid": "1",
"filename": "Screenshot from 2018-06-08 12-54-20.png",
"uri": "http://webiste/api/v1/file/66",
"filemime": "image/png",
"status": "1",
"type": "undefined"
}
]
}我想设置一个nid上传多个图像的"fid“。
,这是我得到的结果

字段是多上传

发布于 2018-06-08 10:02:25
首先命中站点/访问点/文件并发布文件
"fid": "73",
"uid": "1",
"filename": "Screenshot from 2018-06-08 12-54-20 (6th copy).png",
"uri": "public://Screenshot from 2018-06-08 12-54-20 (6th copy).png",
"filemime": "image/png",
"filesize": "159999",
"status": "1",
"timestamp": "1528444702",
"type": "undefined",
"rdf_mapping": [],
"metadata": [],
"uri_full": "http://webiste/sites/default/files/Screenshot%20from%202018-06-08%2012-54-20%20%286th%20copy%29.png",
"target_uri": "Screenshot from 2018-06-08 12-54-20 (6th copy).png",
"file": "iVBORw0KGgoAAAANSUhEUgAABkAAA然后您将得到fid .use fid将其上传到节点。
https://stackoverflow.com/questions/50757515
复制相似问题