{"action":"closed","issue":{"url":"https://api.github.com/repos/TSaaP/tsaap-notes/issues/63","labels_url":"https://api.github.com/repos/TSaaP/tsaap-notes/issues/63/labels{/name}","comments_url":"https://api.github.com/repos/TSaaP/tsaap-notes/issues/63/comments","events_url":"https://api.github.com/repos/TSaaP/tsaap-notes/issues/63/events","html_url":"https://github.com/TSaaP/tsaap-notes/issues/63","id":75182486,"number":63,"title":"Image associated with a note","user":{"login":"FranckSilvestre","id":1417089,"avatar_url":"https://avatars.githubusercontent.com/u/1417089?v=3","gravatar_id":"","url":"https://api.github.com/users/FranckSilvestre","html_url":"https://github.com/FranckSilvestre","followers_url":"https://api.github.com/users/FranckSilvestre/followers","following_url":"https://api.github.com/users/FranckSilvestre/following{/other_user}","gists_url":"https://api.github.com/users/FranckSilvestre/gists{/gist_id}","starred_url":"https://api.github.com/users/FranckSilvestre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FranckSilvestre/subscriptions","organizations_url":"https://api.github.com/users/FranckSilvestre/orgs","repos_url":"https://api.github.com/users/FranckSilvestre/repos","events_url":"https://api.github.com/users/FranckSilvestre/events{/privacy}","received_events_url":"https://api.github.com/users/FranckSilvestre/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/TSaaP/tsaap-notes/labels/User%20story","name":"User story","color":"207de5"}],"state":"closed","locked":false,"assignee":{"login":"vlaks","id":10882293,"avatar_url":"https://avatars.githubusercontent.com/u/10882293?v=3","gravatar_id":"","url":"https://api.github.com/users/vlaks","html_url":"https://github.com/vlaks","followers_url":"https://api.github.com/users/vlaks/followers","following_url":"https://api.github.com/users/vlaks/following{/other_user}","gists_url":"https://api.github.com/users/vlaks/gists{/gist_id}","starred_url":"https://api.github.com/users/vlaks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vlaks/subscriptions","organizations_url":"https://api.github.com/users/vlaks/orgs","repos_url":"https://api.github.com/users/vlaks/repos","events_url":"https://api.github.com/users/vlaks/events{/privacy}","received_events_url":"https://api.github.com/users/vlaks/received_events","type":"User","site_admin":false},"milestone":null,"comments":6,"created_at":"2015-05-11T11:08:49Z","updated_at":"2015-10-06T12:25:39Z","closed_at":"2015-10-06T12:25:39Z","body":"### Description\r\nAs a user\r\nI want to associate an image to a note\r\nSo that I can post a note or ask a question relative to this note\r\n\r\n### Acceptance tests\r\n*Given* \r\nAn authenticated user on a page where he can post a new note\r\n*Then* \r\nThe form used to post a new note has a field labelled \"Image (gif, jpeg and png only)\" composed of an *upload* button. The button is placed above the field use to input the text of the note.\r\n*When*\r\nThe user clicks on the upload button, \r\n*Then* \r\nThe user can browse his file system to choose a gif, jpeg or png  image\r\n*When* \r\nThe user submits the form\r\nThen the note is displayed with the image located above the note or the question.\r\nThe max width of the image is the width of the box displaying the note\r\n\r\n### Technical hint\r\n* The storage system used to store images must be similar to the one used in [eliot-tdbase](https://github.com/ticetime/eliot-tdbase). More precisely, the class located in the package [org.lilie.services.eliot.tice.jackrabbit.core.data.version_2_4_0](https://github.com/ticetime/eliot-tdbase/tree/develop/eliot-tice-plugin/src/java/org/lilie/services/eliot/tice/jackrabbit/core/data/version_2_4_0) can be reused as is. This system guaranties the unicity of a binary file in the system.\r\n* If the image is associated with a note in a scope, the image must be associated with the scope too.\r\n\r\n### Tasks\r\n- [x] studying Liquibase\r\n- [x] studying how to [upload a file with Grails](http://grails.github.io/grails-doc/2.3.4/guide/theWebLayer.html#uploadingFiles)\r\n- [x] studying the part of the code of [eliot-tdbase](https://github.com/ticetime/eliot-tdbase) relative to the storage of files."}}