Sharing/downloading a PDF from a file doesn't populate a meaningful name
Categories
(GeckoView :: PDF Viewer, defect)
Tracking
(Not tracked)
People
(Reporter: olivia, Assigned: olivia)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fxdroid][group6])
Attachments
(3 external files)
Bug 2064934 needs solved first to turn on local downloading. It seems like unrelated data is used for the file name when downloading a local PDF.
| Assignee | ||
Comment 1•2 months ago
|
||
Maybe needs re-verification before acting on this. I don't think I saw it the second time I tried (?).
Comment 2•2 months ago
|
||
The severity field is not set for this bug.
:olivia, could you have a look please?
For more information, please visit BugBot documentation.
Updated•2 months ago
|
| Assignee | ||
Updated•2 months ago
|
| Assignee | ||
Comment 3•2 months ago
|
||
I saw this again, it might be PDF dependent. Dependency on bug 2064727, since it makes some adjustments in the area too for sharing.
| Assignee | ||
Comment 4•1 month ago
•
|
||
verifyDownloadedPDFIsOpenedInFirefoxTest will need to be changed when this is fixed.
| Assignee | ||
Updated•27 days ago
|
| Assignee | ||
Updated•27 days ago
|
| Assignee | ||
Comment 5•27 days ago
|
||
I'm retesting this to understand the problem, I think download is impacted on certain conditions too. I'll follow up with some more testing.
| Assignee | ||
Comment 6•25 days ago
•
|
||
Sharing:
- Always has a random number name from going through a temp file
Downloads:
- Local PDF:
- Tab displays "PDF Title - randomnumber.pdf"
- Download file is "PDF Title - randomnumber.pdf"
- Remote PDF:
- Tab displays "PDF Title - filename.pdf"
- Download file is the same
- Local Signed PDF
- Tab displays "* PDF Title - filename.pdf" <- star appends after signing
- Download file is "* PDF Title - randomnumber.pdf"
- Remote Signed PDF:
- Tab displays "* PDF Title - filename.pdf" <- star appends after signing
- Download file is "_ PDF Title - randomnumber.pdf" <- notice _, I think * is being transformed
- Some PDFs seem to be missing title metadata and will show "Untitled - filename.pdf"
I think that gives us a couple of things to solve, some might be parts on this ticket or otherwise split off. I think some things might have the same root problem.
Issues, in somewhat order of severity:
- Share should have a meaningful name, especially since it cannot be changed.
- Local PDFs should ideally have metadata attached about the filename
- Get information on what * is doing in the PDF metadata title after signing and if we can remove that
- Request product/UI/UX guidance on filename:
- I kinda suspect going with "filename.pdf" is more ideal than "PDF Title - filename.pdf", especially in the "Untitled" metadata cases
- Consider removing "Untitled" when we don't have PDF metadata, minor bug since it is reflecting the reality of the PDF. Probably best to get product/UI/UX behavior here.
| Assignee | ||
Comment 7•25 days ago
|
||
Asked for UI/UX guidance on what the ideal filename we should be striving for downloading and sharing, because the default seems to be all over the place depending on how the file came into Android.
| Assignee | ||
Comment 8•25 days ago
•
|
||
Confirmed UI/UX guidance for filenames:
- Use the filename when available, so
whatthewebsitenamedit.pdf - iff (1) isn't available, then use the Title the PDF identifies as
The PDFs Metadata Title.pdf - iff (1 and 2) isn't available, then use a default neutral title such as
Document.pdf
- I'll check if we already have this string for downloads or if the Android platform naturally has one as an option, otherwise I'll also ask for that string.
(Slack)
| Assignee | ||
Comment 9•25 days ago
•
|
||
Outline I'm seeing right now:
- Part 1: Download - Get current general download behavior as outlined in Comment 8, ideally reusable for share
- Part 2: Local Download - Get local PDFs sending over more data about filename instead of random number
- Part 3: Share - Get share corrected to use the Comment 8 logic instead of temp filename
Get information on what * is doing in the PDF metadata title after signing and if we can remove that
Confirmed this is expected just to signify changes occurred.
| Assignee | ||
Comment 10•21 days ago
|
||
This change ensures the PDF naming preference is as follows:
1st choice: Filename - "filename.pdf" as named by the server, when available
2nd choice: Title - "Title.pdf" as named by the tab metadata, for a PDF viewer tab, it is the PDF title metadata
3rd choice: Fallback - "document.pdf", when we don't have good information on what to do
Before this change, "Title - filename.pdf" was the preferred name when downloading a PDF.
Updated•20 days ago
|
| Assignee | ||
Comment 11•20 days ago
|
||
This patch adjusts the share flow to have a "Content-Disposition" with the filename provided and to use the new filename for sharing. To prevent naming collisions, a folder with a random ID is made in the media cache directory to contain the file. (Before this patch, the temporary file itself had the random ID.)
| Assignee | ||
Comment 12•20 days ago
|
||
This patch changes content:// local PDFs to have a known filename associated in their "Content-Disposition".
Updated•18 days ago
|
| Assignee | ||
Updated•14 days ago
|
Comment 13•14 days ago
|
||
Comment 14•14 days ago
|
||
| bugherder | ||
Comment 15•3 days ago
|
||
Comment 16•2 days ago
|
||
| bugherder | ||
| Assignee | ||
Updated•18 hours ago
|
Description
•