Skip to content
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

Added reference to the File System Access API #2574

Merged
merged 4 commits into from
Mar 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions files/en-us/web/api/filereader/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@

<p>File objects may be obtained from a {{domxref("FileList")}} object returned as a result of a user selecting files using the {{HTMLElement("input")}} element, from a drag and drop operation's {{domxref("DataTransfer")}} object, or from the <code>mozGetAsFile()</code> API on an {{domxref("HTMLCanvasElement")}}.</p>

<div class="notecard warning">
<p>Important note: <code>FileReader</code> is used to read file content from the user's (remote) system in secure ways only. It cannot be used to read a file by pathname from a file system. To read files by pathname in JavaScript, standard Ajax solutions should be used to do server-side file reading, with CORS permission if reading cross-domain.</p>
</div>
<p><code>FileReader</code> can only access the contents of files that the user has explicitly selected, either using an HTML <code>&lt;input type="file"&gt;</code> element or by drag and drop. It cannot be used to read a file by pathname from the user's file system. To read files on the client's file system by pathname, use the <a href="/en-US/docs/Web/API/File_System_Access_API">File System Access API</a>. To read server-side files, use standard Ajax solutions, with CORS permission if reading cross-domain.</p>

<p>{{AvailableInWorkers}}</p>

Expand Down