{"action":"created","issue":{"url":"https://api.github.com/repos/dhlab-basel/Knora/issues/174","repository_url":"https://api.github.com/repos/dhlab-basel/Knora","labels_url":"https://api.github.com/repos/dhlab-basel/Knora/issues/174/labels{/name}","comments_url":"https://api.github.com/repos/dhlab-basel/Knora/issues/174/comments","events_url":"https://api.github.com/repos/dhlab-basel/Knora/issues/174/events","html_url":"https://github.com/dhlab-basel/Knora/issues/174","id":161670454,"number":174,"title":"Return multiple file values in /resources API route","user":{"login":"benjamingeer","id":558389,"avatar_url":"https://avatars.githubusercontent.com/u/558389?v=3","gravatar_id":"","url":"https://api.github.com/users/benjamingeer","html_url":"https://github.com/benjamingeer","followers_url":"https://api.github.com/users/benjamingeer/followers","following_url":"https://api.github.com/users/benjamingeer/following{/other_user}","gists_url":"https://api.github.com/users/benjamingeer/gists{/gist_id}","starred_url":"https://api.github.com/users/benjamingeer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjamingeer/subscriptions","organizations_url":"https://api.github.com/users/benjamingeer/orgs","repos_url":"https://api.github.com/users/benjamingeer/repos","events_url":"https://api.github.com/users/benjamingeer/events{/privacy}","received_events_url":"https://api.github.com/users/benjamingeer/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dhlab-basel/Knora/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"benjamingeer","id":558389,"avatar_url":"https://avatars.githubusercontent.com/u/558389?v=3","gravatar_id":"","url":"https://api.github.com/users/benjamingeer","html_url":"https://github.com/benjamingeer","followers_url":"https://api.github.com/users/benjamingeer/followers","following_url":"https://api.github.com/users/benjamingeer/following{/other_user}","gists_url":"https://api.github.com/users/benjamingeer/gists{/gist_id}","starred_url":"https://api.github.com/users/benjamingeer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjamingeer/subscriptions","organizations_url":"https://api.github.com/users/benjamingeer/orgs","repos_url":"https://api.github.com/users/benjamingeer/repos","events_url":"https://api.github.com/users/benjamingeer/events{/privacy}","received_events_url":"https://api.github.com/users/benjamingeer/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/dhlab-basel/Knora/milestones/1","html_url":"https://github.com/dhlab-basel/Knora/milestones/On%20Deck","labels_url":"https://api.github.com/repos/dhlab-basel/Knora/milestones/1/labels","id":1549435,"number":1,"title":"On Deck","description":null,"creator":{"login":"benjamingeer","id":558389,"avatar_url":"https://avatars.githubusercontent.com/u/558389?v=3","gravatar_id":"","url":"https://api.github.com/users/benjamingeer","html_url":"https://github.com/benjamingeer","followers_url":"https://api.github.com/users/benjamingeer/followers","following_url":"https://api.github.com/users/benjamingeer/following{/other_user}","gists_url":"https://api.github.com/users/benjamingeer/gists{/gist_id}","starred_url":"https://api.github.com/users/benjamingeer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjamingeer/subscriptions","organizations_url":"https://api.github.com/users/benjamingeer/orgs","repos_url":"https://api.github.com/users/benjamingeer/repos","events_url":"https://api.github.com/users/benjamingeer/events{/privacy}","received_events_url":"https://api.github.com/users/benjamingeer/received_events","type":"User","site_admin":false},"open_issues":58,"closed_issues":72,"state":"open","created_at":"2016-01-28T16:58:42Z","updated_at":"2016-06-22T14:03:50Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-06-22T12:37:07Z","updated_at":"2016-06-23T14:52:34Z","closed_at":null,"body":"On the `wip/sofiag` branch, @sofiag creates a resource using the script `create_webPTM_resource.py`. The resource has multiple file values, and these need to be returned by the `/resources` route. I don't know why the file values aren't returned under `locations` in the API response. In any case, `locations` is probably too limited, and it would be better to have an option (e.g. an extra query parameter in the route) that would return the file values along with the other values of the resource."},"comment":{"url":"https://api.github.com/repos/dhlab-basel/Knora/issues/comments/228075391","html_url":"https://github.com/dhlab-basel/Knora/issues/174#issuecomment-228075391","issue_url":"https://api.github.com/repos/dhlab-basel/Knora/issues/174","id":228075391,"user":{"login":"benjamingeer","id":558389,"avatar_url":"https://avatars.githubusercontent.com/u/558389?v=3","gravatar_id":"","url":"https://api.github.com/users/benjamingeer","html_url":"https://github.com/benjamingeer","followers_url":"https://api.github.com/users/benjamingeer/followers","following_url":"https://api.github.com/users/benjamingeer/following{/other_user}","gists_url":"https://api.github.com/users/benjamingeer/gists{/gist_id}","starred_url":"https://api.github.com/users/benjamingeer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjamingeer/subscriptions","organizations_url":"https://api.github.com/users/benjamingeer/orgs","repos_url":"https://api.github.com/users/benjamingeer/repos","events_url":"https://api.github.com/users/benjamingeer/events{/privacy}","received_events_url":"https://api.github.com/users/benjamingeer/received_events","type":"User","site_admin":false},"created_at":"2016-06-23T14:52:33Z","updated_at":"2016-06-23T14:52:33Z","body":"There are at least two problems here:\r\n\r\n* The test script actually uploads only one file, and a preview is created for it; that makes two files. But the preview was not recognised as such because of a bug that had been fixed on the `wip/test_ontology` branch.\r\n* No files appeared under `locations` in an API response for an unknown user, because the files were created with no permissions, because of #79. There's a temporary workaround on the `wip/test_ontology` branch, which puts default permissions on `knora-base:hasStillImageFileValue`.\r\n\r\nI merged `wip/test_ontology` into `wip/sofiag`, so now the API response includes `locations`, `preview`, and `locdata`. @sofiag, can you try it now and see if this is adequate for now? To add multiple files, I think you'll have to create the resource first with one file, then add each additional file separately.\r\n\r\ncc @tobiasschweizer "}}
{"actor":{"display_login":"benjamingeer"}}