{"action":"created","issue":{"url":"https://api.github.com/repos/enyo/dropzone/issues/1188","repository_url":"https://api.github.com/repos/enyo/dropzone","labels_url":"https://api.github.com/repos/enyo/dropzone/issues/1188/labels{/name}","comments_url":"https://api.github.com/repos/enyo/dropzone/issues/1188/comments","events_url":"https://api.github.com/repos/enyo/dropzone/issues/1188/events","html_url":"https://github.com/enyo/dropzone/issues/1188","id":127161546,"number":1188,"title":"Modify file data before sending to server","user":{"login":"uncled1023","id":2438810,"avatar_url":"https://avatars.githubusercontent.com/u/2438810?v=3","gravatar_id":"","url":"https://api.github.com/users/uncled1023","html_url":"https://github.com/uncled1023","followers_url":"https://api.github.com/users/uncled1023/followers","following_url":"https://api.github.com/users/uncled1023/following{/other_user}","gists_url":"https://api.github.com/users/uncled1023/gists{/gist_id}","starred_url":"https://api.github.com/users/uncled1023/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/uncled1023/subscriptions","organizations_url":"https://api.github.com/users/uncled1023/orgs","repos_url":"https://api.github.com/users/uncled1023/repos","events_url":"https://api.github.com/users/uncled1023/events{/privacy}","received_events_url":"https://api.github.com/users/uncled1023/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-18T06:21:59Z","updated_at":"2016-02-08T19:58:02Z","closed_at":null,"body":"I'm not sure if it's possible, or how I can accomplish this.\r\n\r\nCurrently, I have a function being called for the 'accept' event that reads the file data and modifies it.  How or where could I then take that data and over-ride the current added file data?  Is it possible to modify the file data before it being sent to the server?\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/enyo/dropzone/issues/comments/181541152","html_url":"https://github.com/enyo/dropzone/issues/1188#issuecomment-181541152","issue_url":"https://api.github.com/repos/enyo/dropzone/issues/1188","id":181541152,"user":{"login":"koraresu","id":1057774,"avatar_url":"https://avatars.githubusercontent.com/u/1057774?v=3","gravatar_id":"","url":"https://api.github.com/users/koraresu","html_url":"https://github.com/koraresu","followers_url":"https://api.github.com/users/koraresu/followers","following_url":"https://api.github.com/users/koraresu/following{/other_user}","gists_url":"https://api.github.com/users/koraresu/gists{/gist_id}","starred_url":"https://api.github.com/users/koraresu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/koraresu/subscriptions","organizations_url":"https://api.github.com/users/koraresu/orgs","repos_url":"https://api.github.com/users/koraresu/repos","events_url":"https://api.github.com/users/koraresu/events{/privacy}","received_events_url":"https://api.github.com/users/koraresu/received_events","type":"User","site_admin":false},"created_at":"2016-02-08T19:58:02Z","updated_at":"2016-02-08T19:58:02Z","body":"you can edit the file before creating the thumbnail\r\n\r\n`myDropzone.on('thumbnail',function(file){\r\n\tvar cachedFilename = file.name;\r\n\tvar reader = new FileReader();\r\n\tvar $img = $('<img />');\r\n\treader.onloadend = function (file) {\r\n\t\tvar image = new Image();\r\n\t\timage.src = file.target.result;\r\n\t\timage.onload = function() {\r\n\t\t\t$img.attr('src', reader.result);\r\n\t\t}\r\n\t});\r\n\treader.readAsDataURL(f);\r\n}`"}}