how new FileItem through JSON? #1000
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I have a json like
{name:'somefile',url:'someurl'}I try use
let fileItem = new FileItem(this.uploader,null,{})but I get errorhow get a FileItem instance?
You should replace your null value with a File object. A File object can be taken from a FileInput controle.
You should check the sample application, it shows how to use a select-directive and file-drop directive. These two handles the FileInput/Drop control -> File -> FileItem -> a queue for uploading with the upload control.
If you want to create a File from some data you could do it like this:
If you want to upload a url from some external location, you should first need to download that data to the client and create a File from that data.