[internal] FileReader progress handler: converts the CHUNK's progress into a percentage of the whole file, then forwards it to the callback given to the constructor.
Send the file in chunks to the given url The data sent follow this format: ```json { "name": {string},//the file's name "type": {string},//the file's type "size": {integer},//the file's size "offse…
[internal] FileReader progress handler: converts the CHUNK's progress into a percentage of the whole file, then forwards it to the callback given to the constructor.
true once the server has acknowledged at least one chunk
send(url, data, opts)
File.js:139Send the file in chunks to the given url
The data sent follow this format:
```json
{
"name": {string},//the file's name
"type": {string},//the file's type
"size": {integer},//the file's size
"offset": {integer},//the chunk's offset
"data": {string},//a chunk of the file's data
"last": {boolean},//true if this is the last chunk
"filename": {string},//the file's filename for the server (available only from the second chunk, after receiving a response from the server. it is in the response `file.filename`)
}
```send(url, data = {}, opts = {})The response MUST follow this format:
```json
{
"success" : 1,
"file": {
"url" : "...",//the file url
"filename": "...",//the file absolute filename
// ... and any additional fields you want to store, such as width, height, color, extension, etc
}
}
```