Page MenuHomePhabricator

Improve handling of non-supported image types in Pholio
Closed, ResolvedPublic

Description

One of our designers uploaded a PDF file (instead of a static image so that people can copy paste from it). PDFs are not rendered inline and I tried playing with the config settings to force that but couldn't get it to work. That part is likely expected anyway as I don't know if browsers can render PDFs inline now and anyway since they can be multiple pages, it would complicate everything.

There are a few things that Pholio could do better in such situation (maybe this can just be special cased to PDFs):

  • Display a better visual feedback than a small broken icon for the mock when in the Pholio home page
  • Display a better visual feedback than a blank black box when embedded in markup as {M3}
  • Even better since this is a non-displayable type, when embedded in markup, turn into a nice download link like for {F123}

Note that we tried then using a file instead of a mock to store the PDF but then you lose all the benefits of Pholio like revisions, appearing at top of tasks, etc... :(

{F166099 size=full}

{F166101 size=full}

Event Timeline

swisspol renamed this task from Improve handling on non-supported image types in Pholio to Improve handling of non-supported image types in Pholio.
swisspol raised the priority of this task from to Needs Triage.
swisspol updated the task description. (Show Details)
swisspol added a subscriber: swisspol.
chad added a subscriber: chad.

T4056 is a task for additional filetypes, but we should also fix these broken states as well.

chad triaged this task as Normal priority.
epriestley added a subscriber: epriestley.

D9548 does a pass on this, and should get rid of the obviously-broken cases.

I'm going to close this since T4056 covers improving support for other file types. However, most of the thinking there is focused on other media types (audio, video). It's reasonably likely we will never have first-class support for PDFs (e.g., showing them inline and rendering them). Using Pholio as a specialized version of Files is also off-label, and should work sort-of-okay but I don't anticipate ever, e.g., making mock embeds render as download links if the mock has only one active non-image file.

I'm also not sure I understand the original use case -- what can users copy/paste from a PDF that they can't copy/paste normally? (e.g., you can copy images from Pholio with right-click/control-click) Does the PDF have interfaces that are composited including text that users might reasonably want to copy/paste?

Thanks much for addressing this issue Evan.

Yes, I'm pretty sure the intend was to allow the engineer to copy-paste text from inside the PDF.