Closed coolaj86 closed 13 years ago
Sorry coolaj86, I'm very interested in your comments, but I have no time for now!! I'll be very happy, if we can wait some days to talk about these things! However, I can do some modifications for your needs! Thanks, for now!
Example: When I want to know how many files I've received:
Object.keys(ev.completed).length
vs files.length
Here's another possible consideration for the progress / end events. I'll have to play with the idea and see if it works well.
fields: [
{
name: "field-name"
, value: {
name: "file.ext"
, path: "/tmp/xyz/c876efe93eaceb482ba74...e85.ext"
, ...
}
}
, {
name: "other-field-name"
, value: ""
, exception: { ... }
}
]
Yeah, perhaps we can get on IRC sometime and talk about it and invite some of the other watchers.
Yes!! I'd like to invite also dvv, I'm becoming his nightmare!! :D
Update:
From module version 0.5.0 :
- json.completed property now is named json.files and it is an array rather than a hash/map .
Update:
From module version 0.5.3 (now on test) :
- changed all events names/types for consistency with XHR2 API
- new json response objects..
fields
is an array. I like this.shouldn't
completed
be namedfiles
and also be an array rather than a hash/map?It seems there should be an
exceptions
array (this could contain theincomplete
files).it would be nice if
dataprogress
andend
events were of the same type and had the same fields - the only difference being thatend
would be the very lastdataprogress
event.Lastly, I'd prefer that the event names match up with the XHR2 API.
Errors
abort
- if the form parsing is aborted by server configuration (file too large, etc)error
- exceptions, parse errors, etctimeout
- if the client waits too long between sending dataSuccesses
loadstart
- as soon as formaline determines that it will be parsing the responseprogress
- a mix of the currentdataprogress
andend
eventsload
- when all files complete successfullyEnd
loadend
- when the request is completed by one ofabort
,error
,timeout
, orload