Closed (fixed)
Project:
RESTful Web Services
Version:
7.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
8 Sep 2011 at 16:22 UTC
Updated:
4 Jan 2014 at 01:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dasjofrom the question it is not quite clear what exactly you want to accomplish, please elaborate more precisely :)
Comment #2
Dinesh Kumar Sarangapani commentedHow Image fields and other media fields are exposed in service.Whether it should expose image URI?
I get only alt tag as shown below
Comment #3
dgtlmoon commentedI can confirm the same problem, essentially the poster is saying their content field (file/image) is not showing any data
example where field_picture has data when loaded through the HTTP GET browser stylee, but not 1.json RESTws stylee
{"nid":"2","vid":"2","is_new":false,"type":"picture","title":"funny","language":"und","url":"http:\/\/d7services.localhost\/node\/2","edit_url":"http:\/\/d7services.localhost\/node\/2\/edit","status":"1","promote":"0","sticky":"0","created":"1325697881","changed":"1325697881","comment":"2","comment_count":"0","comment_count_new":false,"body":[],"field_picture":[]}Comment #4
amitaibu1) Create a node with a file/ image
2) Query node (e.g. node/1.json) -- the file info with the file ID isn't there.
Comment #5
amitaibuPatch fixes the problem by changing the IF statement, as EntityStructureWrapper's value can be retrieved by $property->value() as EntityValueWrapper does.
Comment #6
klausiHm, this workaround does not look right to me. Why does the EntityStructureWrapper not contain any property information? Just using the value of the structure wrapper would work for array structures, but if this is some other kind of structure (object?) then we would run into a problem.
Comment #7
amitaibuSorry klausi, I didn't understand your comment.
Are you able to get file info without the patch?
Comment #8
klausiDigging into this I found that the access handling of files is broken, that's why the file field is omitted. This is a known issue of entity API: #1136356: Fix file access (and this has been an issue in RESTWS some time ago, I just forgot about it, sorry).
Comment #9
klausiReopening to track this as Sebastian will work on it during GSoC.
Comment #10
sepgil commentedThe Entity API Issue #1136356: Fix file access was fixed and therefore image and other file fields should now be included in responses.