Does the specification define input[type=file] .files expected behaviour to relevant to reflecting real-time changes to user selected file?
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- html, javascript
Direzione di ricerca
Esamina le definizioni della File API per File e FileList, quindi confronta i relativi requisiti con la riproduzione collegata su Stack Overflow e con le osservazioni in Chromium 65 e Firefox Trunk. Il lavoro è completo quando si determina se le modifiche successive alla selezione delle dimensioni e di lastModified di un file locale devono essere riflesse e si documenta o chiarisce di conseguenza la specifica.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Consider the HTML and JavaScript posted at this Stack Overflow question Input file size and content do not update on macOS
HTML
<!DOCTYPE html>
<input type="file" id="file" />
<p id="info"></p>
JavaScript
window.addEventListener('load', function() {
window.setInterval(function() {
var logFile = document.querySelector('#file').files[0];
if (logFile) {
document.querySelector('#info').innerHTML = '<br/>' +
(new Date()).toString() + '<br/>Last modified: ' +
logFile.lastModified +
'<br/>Size: ' +
logFile.size;
}
}, 1000);
});
Reproduce steps as described by OP of the question
Please test with following snippet. Select a file (for example a text file), see last modified timestamp and file size, then change file and look again, if size has changed. On macOS the file size doesn't change.
Using a sample file, for example, https://gist.github.com/guest271314/11edc4566ba94f204dd46e6ae26edaad#file-d134213ba9465cb74dfd36cde47bf102638c4a9f3aca357f79ee747dd5f49f1e0f0de , which contains the text
123
Behaviour
Chromium 65
Once the local file is selected by user action and the local file is changed at a text editor, for example, by typing 4 following the existing 123 at the file (for example, the above linked gist) both lastModified and size properties are reflected as being changed client side, indicating changes to local file are being updated in real time though the user has not performed the affirmative action of re-selecting the file.
Firefox Trunk (60)
Once the local file is selected by user action and the local file is changed at a text editor, for example, by typing 4 following the existing 123 at the file (for example, the above linked gist) both lastModified and size properties are not reflected as being changed client side, indicating changes to local file are being not updated in real time where the user has not performed the affirmative action of re-selecting the file.
What does the specification define as the expected behaviour of size and lastModified properties of a File object within a FileList object where changes to an underlying local file are made after user selection of a local file?
- Lingua principale
- HTML
- Stelle
- 118
- Fork
- 52
- Merge medio
- 9g 16h
- PR unite (30g)
- 1
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di w3c/FileAPI
-
TPAC 2026 Status Report ApertaTPAC2026
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 62/100
-
Add accessibility section Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
Issue simili
-
Area: Excel support
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
orbeon/orbeon-forms#7893 ·
-
essnmx good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
yeti-platform/yeti#1380 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
modelcontextprotocol/python-sdk#3566 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
griptape-ai/griptape#2353 ·