-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File and FileReader #296
File and FileReader #296
Conversation
longo-andrea seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
- **`lastModified`** -- the timestamp (integer date) of last modification. | ||
- **`fileParts`**, è una array di valori di tipo Blob/BufferSource/String. | ||
- **`fileName`**, il nome del file. | ||
- **`options`**, oggetto opzionale: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- **`options`**, oggetto opzionale: | |
- **`options`** - oggetto opzionale: |
- **`fileParts`**, è una array di valori di tipo Blob/BufferSource/String. | ||
- **`fileName`**, il nome del file. | ||
- **`options`**, oggetto opzionale: | ||
- **`lastModified`**, il timestamp dell'ultima modifica (un intero). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- **`lastModified`**, il timestamp dell'ultima modifica (un intero). | |
- **`lastModified`** - il timestamp dell'ultima modifica (un intero). |
- `name` -- the file name, | ||
- `lastModified` -- the timestamp of last modification. | ||
Poiché `File` eredita da `Blob`, gli oggetti di tipo `File` possiedono le stesse proprietà, con l'aggiunta di: | ||
- `name`, il nome del file, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `name`, il nome del file, | |
- `name` - il nome del file, |
- `name` -- the file name, | ||
- `lastModified` -- the timestamp of last modification. | ||
Poiché `File` eredita da `Blob`, gli oggetti di tipo `File` possiedono le stesse proprietà, con l'aggiunta di: | ||
- `name`, il nome del file, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `name`, il nome del file, | |
- `name` - il nome del file, |
- `lastModified` -- the timestamp of last modification. | ||
Poiché `File` eredita da `Blob`, gli oggetti di tipo `File` possiedono le stesse proprietà, con l'aggiunta di: | ||
- `name`, il nome del file, | ||
- `lastModified`, il timestamp dell'ultima modifica. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `lastModified`, il timestamp dell'ultima modifica. | |
- `lastModified` - il timestamp dell'ultima modifica. |
- **`readAsText(blob, [encoding])`** -- read the data as a text string with the given encoding (`utf-8` by default). | ||
- **`readAsDataURL(blob)`** -- read the binary data and encode it as base64 data url. | ||
- **`abort()`** -- cancel the operation. | ||
- **`readAsArrayBuffer(blob)`**, legge i dati in formato binario da `ArrayBuffer`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- **`readAsArrayBuffer(blob)`**, legge i dati in formato binario da `ArrayBuffer`. | |
- **`readAsArrayBuffer(blob)`** - legge i dati in formato binario da `ArrayBuffer`. |
- **`readAsDataURL(blob)`** -- read the binary data and encode it as base64 data url. | ||
- **`abort()`** -- cancel the operation. | ||
- **`readAsArrayBuffer(blob)`**, legge i dati in formato binario da `ArrayBuffer`. | ||
- **`readAsText(blob, [encoding])`**, legge i dati come stringa di testo con uno specifico encoding (`utf-8` di default). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- **`readAsText(blob, [encoding])`**, legge i dati come stringa di testo con uno specifico encoding (`utf-8` di default). | |
- **`readAsText(blob, [encoding])`** - legge i dati come stringa di testo con uno specifico encoding (`utf-8` di default). |
- **`abort()`** -- cancel the operation. | ||
- **`readAsArrayBuffer(blob)`**, legge i dati in formato binario da `ArrayBuffer`. | ||
- **`readAsText(blob, [encoding])`**, legge i dati come stringa di testo con uno specifico encoding (`utf-8` di default). | ||
- **`readAsDataURL(blob)`**, legge i dati in formato binario e li codifica come URL in base64. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- **`readAsDataURL(blob)`**, legge i dati in formato binario e li codifica come URL in base64. | |
- **`readAsDataURL(blob)`** - legge i dati in formato binario e li codifica come URL in base64. |
- **`abort()`**, annulla l'operazione. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- **`abort()`**, annulla l'operazione. | |
- **`abort()`** - annulla l'operazione. | |
- `readAsArrayBuffer` -- for binary files, to do low-level binary operations. For high-level operations, like slicing, `File` inherits from `Blob`, so we can call them directly, without reading. | ||
- `readAsText` -- for text files, when we'd like to get a string. | ||
- `readAsDataURL` -- when we'd like to use this data in `src` for `img` or another tag. There's an alternative to reading a file for that, as discussed in chapter <info:blob>: `URL.createObjectURL(file)`. | ||
- `readAsArrayBuffer`, per file di tipo binario, per eseguire operazioni a basso livello. Per operazioni ad alto livello, come la rimozione di porzioni di file, `File` eredita da `Blob`, quindi possiamo invocare i suoi metodi direttamente, senza iniziare la lettura. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `readAsArrayBuffer`, per file di tipo binario, per eseguire operazioni a basso livello. Per operazioni ad alto livello, come la rimozione di porzioni di file, `File` eredita da `Blob`, quindi possiamo invocare i suoi metodi direttamente, senza iniziare la lettura. | |
- `readAsArrayBuffer` - per file di tipo binario, per eseguire operazioni a basso livello. Per operazioni ad alto livello, come la rimozione di porzioni di file, `File` eredita da `Blob`, quindi possiamo invocare i suoi metodi direttamente, senza iniziare la lettura. |
- `readAsText` -- for text files, when we'd like to get a string. | ||
- `readAsDataURL` -- when we'd like to use this data in `src` for `img` or another tag. There's an alternative to reading a file for that, as discussed in chapter <info:blob>: `URL.createObjectURL(file)`. | ||
- `readAsArrayBuffer`, per file di tipo binario, per eseguire operazioni a basso livello. Per operazioni ad alto livello, come la rimozione di porzioni di file, `File` eredita da `Blob`, quindi possiamo invocare i suoi metodi direttamente, senza iniziare la lettura. | ||
- `readAsText`, per file di tipo testuale, per ottenerli sotto forma di stringa. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `readAsText`, per file di tipo testuale, per ottenerli sotto forma di stringa. | |
- `readAsText` - per file di tipo testuale, per ottenerli sotto forma di stringa. |
- `readAsDataURL` -- when we'd like to use this data in `src` for `img` or another tag. There's an alternative to reading a file for that, as discussed in chapter <info:blob>: `URL.createObjectURL(file)`. | ||
- `readAsArrayBuffer`, per file di tipo binario, per eseguire operazioni a basso livello. Per operazioni ad alto livello, come la rimozione di porzioni di file, `File` eredita da `Blob`, quindi possiamo invocare i suoi metodi direttamente, senza iniziare la lettura. | ||
- `readAsText`, per file di tipo testuale, per ottenerli sotto forma di stringa. | ||
- `readAsDataURL`, quando siamo interessati da utilizzare questi dati come `src` su un `img` o un altro tag. In questo caso c'è un ulteriore alternativa , che abbiamo discusso nel capitolo <info:blob>: `URL.createObjectURL(file)`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `readAsDataURL`, quando siamo interessati da utilizzare questi dati come `src` su un `img` o un altro tag. In questo caso c'è un ulteriore alternativa , che abbiamo discusso nel capitolo <info:blob>: `URL.createObjectURL(file)`. | |
- `readAsDataURL` - quando siamo interessati da utilizzare questi dati come `src` su un `img` o un altro tag. In questo caso c'è un ulteriore alternativa , che abbiamo discusso nel capitolo <info:blob>: `URL.createObjectURL(file)`. |
- `error` -- error has occurred. | ||
- `loadend` -- reading finished with either success or failure. | ||
Mentre il processo di lettura prosegue, vengono emessi degli eventi: | ||
- `loadstart`, la lettura è iniziata. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `loadstart`, la lettura è iniziata. | |
- `loadstart` - la lettura è iniziata. |
- `loadend` -- reading finished with either success or failure. | ||
Mentre il processo di lettura prosegue, vengono emessi degli eventi: | ||
- `loadstart`, la lettura è iniziata. | ||
- `progress`, durante la lettura. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `progress`, durante la lettura. | |
- `progress` - durante la lettura. |
Mentre il processo di lettura prosegue, vengono emessi degli eventi: | ||
- `loadstart`, la lettura è iniziata. | ||
- `progress`, durante la lettura. | ||
- `load`, nessun errore, lettura completata. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `load`, nessun errore, lettura completata. | |
- `load` - nessun errore, lettura completata. |
- `loadstart`, la lettura è iniziata. | ||
- `progress`, durante la lettura. | ||
- `load`, nessun errore, lettura completata. | ||
- `abort`, invocato `abort()`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `abort`, invocato `abort()`. | |
- `abort` - invocato `abort()`. |
- `progress`, durante la lettura. | ||
- `load`, nessun errore, lettura completata. | ||
- `abort`, invocato `abort()`. | ||
- `error`, si è verificato un errore. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `error`, si è verificato un errore. | |
- `error` - si è verificato un errore. |
- `load`, nessun errore, lettura completata. | ||
- `abort`, invocato `abort()`. | ||
- `error`, si è verificato un errore. | ||
- `loadend`, lettura completata con o senza errori. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `loadend`, lettura completata con o senza errori. | |
- `loadend` - lettura completata con o senza errori. |
- `readAsText(blob, [encoding])` -- to string (an alternative to `TextDecoder`), | ||
- `readAsDataURL(blob)` -- to base64 data url. | ||
Possiamo utilizzarlo per convertire un `Blob` in un altro formato: | ||
- `readAsArrayBuffer(blob)`, per convertirlo ad `ArrayBuffer`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `readAsArrayBuffer(blob)`, per convertirlo ad `ArrayBuffer`, | |
- `readAsArrayBuffer(blob)` - per convertirlo ad `ArrayBuffer`, |
- `readAsDataURL(blob)` -- to base64 data url. | ||
Possiamo utilizzarlo per convertire un `Blob` in un altro formato: | ||
- `readAsArrayBuffer(blob)`, per convertirlo ad `ArrayBuffer`, | ||
- `readAsText(blob, [encoding])`, per convertirlo a string (un'alternativa a `TextDecoder`), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `readAsText(blob, [encoding])`, per convertirlo a string (un'alternativa a `TextDecoder`), | |
- `readAsText(blob, [encoding])` - per convertirlo a string (un'alternativa a `TextDecoder`), |
Possiamo utilizzarlo per convertire un `Blob` in un altro formato: | ||
- `readAsArrayBuffer(blob)`, per convertirlo ad `ArrayBuffer`, | ||
- `readAsText(blob, [encoding])`, per convertirlo a string (un'alternativa a `TextDecoder`), | ||
- `readAsDataURL(blob)`, per convertirlo ad url in base64. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `readAsDataURL(blob)`, per convertirlo ad url in base64. | |
- `readAsDataURL(blob)` - per convertirlo ad url in base64. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Piccole modifiche e suggerimenti
Co-authored-by: Dorin David <70648503+Dorin-David@users.noreply.github.com>
Thank you 💖 I updated the Progress Issue #1 🎉 🎉 🎉 |
No description provided.