Commit 2498c970 authored by Lei Zhang's avatar Lei Zhang Committed by Commit Bot

Add a file type description when saving edited PDFs.

When calling chrome.fileSystem.chooseEntry() to save edited PDFs, there
is an option for the file types to accept. For each file type, the
description is optional. The API documentation [1] says "if not present,
a description will be automatically generated", but the generated
description ended up being an empty string in this case. Fix this by
manually setting the file type description.

[1] https://developer.chrome.com/apps/fileSystem

Bug: 1114127
Change-Id: If3440fcd13a152bb55e8f80193b4960103776cd7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2343782Reviewed-by: default avatarSam McNally <sammc@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#796427}
parent 7bbcac65
...@@ -944,7 +944,7 @@ export class PDFViewerElement extends PDFViewerBaseElement { ...@@ -944,7 +944,7 @@ export class PDFViewerElement extends PDFViewerBaseElement {
chrome.fileSystem.chooseEntry( chrome.fileSystem.chooseEntry(
{ {
type: 'saveFile', type: 'saveFile',
accepts: [{extensions: ['pdf']}], accepts: [{description: '*.pdf', extensions: ['pdf']}],
suggestedName: fileName suggestedName: fileName
}, },
entry => { entry => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment