{"action":"created","issue":{"url":"https://api.github.com/repos/icelab/formalist-standard-react/issues/72","repository_url":"https://api.github.com/repos/icelab/formalist-standard-react","labels_url":"https://api.github.com/repos/icelab/formalist-standard-react/issues/72/labels{/name}","comments_url":"https://api.github.com/repos/icelab/formalist-standard-react/issues/72/comments","events_url":"https://api.github.com/repos/icelab/formalist-standard-react/issues/72/events","html_url":"https://github.com/icelab/formalist-standard-react/pull/72","id":157801194,"number":72,"title":"Export file-attributes when file has uploaded","user":{"login":"chrisbuttery","id":121675,"avatar_url":"https://avatars.githubusercontent.com/u/121675?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisbuttery","html_url":"https://github.com/chrisbuttery","followers_url":"https://api.github.com/users/chrisbuttery/followers","following_url":"https://api.github.com/users/chrisbuttery/following{/other_user}","gists_url":"https://api.github.com/users/chrisbuttery/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisbuttery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisbuttery/subscriptions","organizations_url":"https://api.github.com/users/chrisbuttery/orgs","repos_url":"https://api.github.com/users/chrisbuttery/repos","events_url":"https://api.github.com/users/chrisbuttery/events{/privacy}","received_events_url":"https://api.github.com/users/chrisbuttery/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-06-01T00:47:43Z","updated_at":"2016-06-02T01:47:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/icelab/formalist-standard-react/pulls/72","html_url":"https://github.com/icelab/formalist-standard-react/pull/72","diff_url":"https://github.com/icelab/formalist-standard-react/pull/72.diff","patch_url":"https://github.com/icelab/formalist-standard-react/pull/72.patch"},"body":"This PR exports the attache server response on upload.\r\n\r\n![fileattributes](https://cloud.githubusercontent.com/assets/121675/15694932/94093b1e-27e5-11e6-9fec-beb9987eb445.gif)\r\n\r\nIn this example, the existing file is loaded using the following data structure.\r\n\r\n```\r\nvalue = [\r\n  {\r\n    fileAttributes: {\r\n      \"original_url\": \"http://icelab.attache.me/view/1a/84/db/cb/41/fc/37/f1/fe/da/79/ab/5a/cb/75/c2/original/mullet.png\",\r\n      \"thumbnail_url\": \"http://icelab.attache.me/view/1a/84/db/cb/41/fc/37/f1/fe/da/79/ab/5a/cb/75/c2/50x/mullet.png\",\r\n      \"name\": \"foo\"\r\n    }\r\n  }\r\n]\r\n```\r\n\r\nDuring the upload process the attache server's response is saved to the UI's `fileObject` like so:\r\n\r\n```\r\n{\r\n  file: [ File ],\r\n  fileAttributes: {\r\n    // attache response\r\n  },\r\n  progress: 100 // used for rendering the upload progress\r\n}\r\n```\r\n\r\nOnce completed, we export just the `fileAttributes` of this object - as you'll see in the console of the example.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/icelab/formalist-standard-react/issues/comments/223174564","html_url":"https://github.com/icelab/formalist-standard-react/pull/72#issuecomment-223174564","issue_url":"https://api.github.com/repos/icelab/formalist-standard-react/issues/72","id":223174564,"user":{"login":"chrisbuttery","id":121675,"avatar_url":"https://avatars.githubusercontent.com/u/121675?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisbuttery","html_url":"https://github.com/chrisbuttery","followers_url":"https://api.github.com/users/chrisbuttery/followers","following_url":"https://api.github.com/users/chrisbuttery/following{/other_user}","gists_url":"https://api.github.com/users/chrisbuttery/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisbuttery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisbuttery/subscriptions","organizations_url":"https://api.github.com/users/chrisbuttery/orgs","repos_url":"https://api.github.com/users/chrisbuttery/repos","events_url":"https://api.github.com/users/chrisbuttery/events{/privacy}","received_events_url":"https://api.github.com/users/chrisbuttery/received_events","type":"User","site_admin":false},"created_at":"2016-06-02T01:47:14Z","updated_at":"2016-06-02T01:47:14Z","body":"@makenosound @timriley \r\n\r\nI just wanted to confirm if we're happy with what this module is exporting.\r\n\r\nThis gif displays an existing uploaded file using this structure\r\n\r\n```\r\n{\r\n  name: \"Mullet\",\r\n  original_url: \"http://icelab.attache.me/view/1a/84/db/cb/41/fc/37/f1/fe/da/79/ab/5a/cb/75/c2/original/mullet.png\",\r\n  thumbnail_url: \"http://icelab.attache.me/view/1a/84/db/cb/41/fc/37/f1/fe/da/79/ab/5a/cb/75/c2/50x/mullet.png\"\r\n}\r\n```\r\n\r\n![fileattributes](https://cloud.githubusercontent.com/assets/121675/15731334/aa34efd2-28b7-11e6-87f6-5c2dfe2301af.gif)\r\n\r\nA file is then uploaded and we see the results of the attributes being exported.\r\nSo for the existing file (the first object) we're exporting the exact same data that was initially passed in for it - whereas the 2nd object is the attache response for the upload.\r\n\r\nOh, and this PR is now using the updated `attache-upload.js` module. 👍 \r\n\r\n"}}
{"actor":{"display_login":"chrisbuttery"}}