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

Add File Handling API / file_handlers sample #1024

Merged
merged 6 commits into from
Nov 1, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix code and update README with correct UI text
oliverdunk committed Nov 1, 2023

Verified

This commit was signed with the committer’s verified signature.
barakb Barak Bar Orion
commit 5ffee4b7d175d8e3c54464afca5a5c1e5b4b8f12
2 changes: 1 addition & 1 deletion functional-samples/cookbook.file_handlers/README.md
Original file line number Diff line number Diff line change
@@ -18,4 +18,4 @@ applications.
2. Load this directory in Chrome as an [unpacked extension](https://developer.chrome.com/docs/extensions/mv3/getstarted/development-basics/#load-unpacked).
3. Create a .txt file on your ChromeOS device.
4. In the Files app, select the file.
5. In the toolbar, choose "Open with..." and then "File Handling API".
5. In the toolbar, choose "Open" and then "File Handling API".
2 changes: 1 addition & 1 deletion functional-samples/cookbook.file_handlers/view-file.js
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ async function consumer(launchParams) {
// Get metadata for each file.
const files = await Promise.all(
launchParams.files.map(async (f) => {
const file = await f.file();
const file = await f.getFile();

return {
name: file.name,