| order | 7 |
|---|
Validating files with the @accept arg has been removed. See: Custom validation for a more reliable solution.
Due to accessibility concerns and DOM inflexibility, as of v5 this component is deprecated.
It has been replaced by the queue.selectFile modifier which can be applied to a file input.
The <FileUpload> component renders a hidden <input type="file"> within a label, and yields to a block for the implementer to define their own "button".
This technique is not necessarily endorsed, but it may be replicated with the following example:
ℹ️ Consider if this is necessary in your application – you may simplify your template and improve accessibility with a visible file input.
@accepthas been removed in favour of Custom validation.@disabledhas been removed. Disable uploads in your application code.@namehas been deprecated in favour of passing a queue directly via@queue.@onFileAddhas been deprecated. UseonFileAddedwith{{file-queue}}helper or@onDrop.- HTML attributes are be applied to the Dropzone element.
The File class has been renamed to UploadFile. This is to avoid conflict and confusion with the native File class.
// v4
import File from 'ember-file-upload/file';
// v5
import UploadFile from 'ember-file-upload/upload-file';