How to get file field in Auto Form?


#1

I would like to get file field property such as name, size...

// Template
{{> afQuickField name='restoreFile' accept=".tar"}}

// JS
AutoForm.hooks({
    myForm: {
        onSubmit: function (insertDoc, updateDoc, currentDoc) {
            this.event.preventDefault();
           
            var file = insertDoc.restoreFile;
            console.log(file); .name, .size

Please help me.