Does the specification define input[type=file] .files expected behaviour to relevant to reflecting real-time changes to user selected file?
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- html, javascript
調査の方向性
File API の File と FileList の定義を確認し、その要件を、リンク先の Stack Overflow の再現例および Chromium 65 と Firefox Trunk での観察結果と比較します。選択後にローカルファイルのサイズと lastModified に加えられた変更を反映する必要があるかどうかを判断し、それに応じて仕様を文書化または明確化できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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?
- 主要言語
- HTML
- スター
- 118
- フォーク
- 52
- 平均マージ
- 9日 16時間
- マージ済み PR(30日)
- 1
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
w3c/FileAPI のほかの issue
-
TPAC2026
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
code-quality refactoring
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
github/gh-aw-firewall#8816 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
getgrav/grav-plugin-api#45 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
langchain-ai/deepagents#6450 ·