- From: Cyril Concolato <cyril.concolato@telecom-paristech.fr>
- Date: Thu, 17 Jan 2013 10:56:14 +0100
- To: public-webapps@w3.org
- Message-ID: <50F7CABE.1050708@telecom-paristech.fr>
Hi all, Reading the File API, it is not clear to me what the behavior is when reading partial Blob data. The spec says: " Partial Blob data is the part of the |File| <http://dev.w3.org/2006/webapi/FileAPI/#dfn-file> or |Blob| <http://dev.w3.org/2006/webapi/FileAPI/#dfn-Blob> that has been read into memory /currently/; when processing the read method <http://dev.w3.org/2006/webapi/FileAPI/#read-methods> |readAsText| <http://dev.w3.org/2006/webapi/FileAPI/#dfn-readAsText>, partial Blob data is a |DOMString| that is incremented as more bytes are |loaded| (a portion of the |total|) [ProgressEvents <http://dev.w3.org/2006/webapi/FileAPI/#ProgressEvents>], and when processing |readAsArrayBuffer| <http://dev.w3.org/2006/webapi/FileAPI/#dfn-readAsArrayBuffer> partial Blob data is an |ArrayBuffer| [TypedArrays <http://dev.w3.org/2006/webapi/FileAPI/#TypedArrays>] object consisting of the bytes |loaded| so far (a portion of the |total|)[ProgressEvents <http://dev.w3.org/2006/webapi/FileAPI/#ProgressEvents>]. " Does this mean that the result object is the same or it is a new object each time there is a progress event ? In the case of a DOMString, it could be the same object incremented but if it is an ArrayBuffer, since it is immutable, it cannot be incremented. So in the case the final length of the Blob is not known yet (e.g. chunked XHR), result has to be a new object each time. Am I wrong here? If not, could you clarify the spec ? Cyril -- Cyril Concolato Maître de Conférences/Associate Professor Groupe Multimedia/Multimedia Group Telecom ParisTech 46 rue Barrault 75 013 Paris, France http://concolato.wp.mines-telecom.fr/
Received on Thursday, 17 January 2013 09:56:45 UTC