Open Nininea-zz opened 10 years ago
I'm into react these days so ... a few questions to help debug the issue.
What version of ember are you using with this. If you throw a debugger inline can you see if self.get('target') is actually the controller (not sure how the latest ember works these days but I felt it was worth asking a few questions first)
i used this uploader view export default Ember.TextField.extend({ type:'file', attributeBinding:['name'], change:function(evt){ var input = evt.target; if (input.files && input.files[0]) { var read=new window.FileReader(); var self=this; read.onload=function(e) { var fileToUpload=read.result; self.get('controller').set(self.name, fileToUpload); window.console.log("data setted"); }; read.readAsDataURL(input.files[0]); } } }); inside my template use view like this
{{view "upload-file" name="bankdocument" contentBinding="content"}}
when try submit, value is "bankdocument" empty I dont use another view, submit action is inside controller : export default Ember.ObjectController.extend({
});
how can I fix this problem?