{"action":"created","issue":{"url":"https://api.github.com/repos/danialfarid/ng-file-upload/issues/1204","labels_url":"https://api.github.com/repos/danialfarid/ng-file-upload/issues/1204/labels{/name}","comments_url":"https://api.github.com/repos/danialfarid/ng-file-upload/issues/1204/comments","events_url":"https://api.github.com/repos/danialfarid/ng-file-upload/issues/1204/events","html_url":"https://github.com/danialfarid/ng-file-upload/issues/1204","id":122252898,"number":1204,"title":"updating files from server","user":{"login":"salimchami","id":1632333,"avatar_url":"https://avatars.githubusercontent.com/u/1632333?v=3","gravatar_id":"","url":"https://api.github.com/users/salimchami","html_url":"https://github.com/salimchami","followers_url":"https://api.github.com/users/salimchami/followers","following_url":"https://api.github.com/users/salimchami/following{/other_user}","gists_url":"https://api.github.com/users/salimchami/gists{/gist_id}","starred_url":"https://api.github.com/users/salimchami/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/salimchami/subscriptions","organizations_url":"https://api.github.com/users/salimchami/orgs","repos_url":"https://api.github.com/users/salimchami/repos","events_url":"https://api.github.com/users/salimchami/events{/privacy}","received_events_url":"https://api.github.com/users/salimchami/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-15T11:34:22Z","updated_at":"2015-12-15T18:06:59Z","closed_at":"2015-12-15T18:06:59Z","body":"Hi! and thanks for this interesting directive.\r\n\r\nI'm working on a form wich contains an upload part and when i submit my form, i save all the files in a server folder. \r\nAfter that, i want to display these files in a form to update it. How can use the same scope variables to store these files ? \r\n\r\nNow, i can retrieve my files from server (array of bytes) but i don't know how can i convert it to your directive variable \"files\". \r\n\r\nthanks"},"comment":{"url":"https://api.github.com/repos/danialfarid/ng-file-upload/issues/comments/164843792","html_url":"https://github.com/danialfarid/ng-file-upload/issues/1204#issuecomment-164843792","issue_url":"https://api.github.com/repos/danialfarid/ng-file-upload/issues/1204","id":164843792,"user":{"login":"danialfarid","id":1676054,"avatar_url":"https://avatars.githubusercontent.com/u/1676054?v=3","gravatar_id":"","url":"https://api.github.com/users/danialfarid","html_url":"https://github.com/danialfarid","followers_url":"https://api.github.com/users/danialfarid/followers","following_url":"https://api.github.com/users/danialfarid/following{/other_user}","gists_url":"https://api.github.com/users/danialfarid/gists{/gist_id}","starred_url":"https://api.github.com/users/danialfarid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danialfarid/subscriptions","organizations_url":"https://api.github.com/users/danialfarid/orgs","repos_url":"https://api.github.com/users/danialfarid/repos","events_url":"https://api.github.com/users/danialfarid/events{/privacy}","received_events_url":"https://api.github.com/users/danialfarid/received_events","type":"User","site_admin":false},"created_at":"2015-12-15T18:06:59Z","updated_at":"2015-12-15T18:06:59Z","body":"If you don't care about form file input value being set you can do \r\n```\r\n$http({url: url, method: 'get', responseType: 'arraybuffer'}).then(function (resp) {\r\n            var arrayBufferView = new Uint8Array(resp.data);\r\n            var type = resp.headers('content-type') || 'application/octet-stream';\r\n            var blob = new window.Blob([arrayBufferView], {type: type});\r\n            files.push(blob);\r\n});\r\n```"}}