I don't think this ever used to happen. Now whenever I use the "View File" link and try to share it or embed it on an external website, I get a "File link has expired" message.
Is there any way to get direct links to images now?
I don't think this ever used to happen. Now whenever I use the "View File" link and try to share it or embed it on an external website, I get a "File link has expired" message.
Is there any way to get direct links to images now?
Files now have a "cacheable" flag, which is approximately equivalent to "public" -- internally, canCDN, i.e., can distribute over a content distribution network.
We currently set this flag on files uploaded as profile images, on generated thumbnails, and on files uploaded as macros.
Files with this flag allow public access without a one-time token. Flags without it require the viewer to carry a token with them, essentially proving they have current access to the file itself (and don't just know the URL). This stuff was added in T5685 and related tasks, primarily to give installs greater confidence about using Phabricator to store sensitive documents. Although the one-time tokens aren't really much more secure than the unguessable URLs alone in a practical sense, they feel a lot more secure.
This doesn't address two use cases, which are sort of the same use case, but not quite:
We could do a couple of things here, I think:
Do any of these feel clearly better/worse to you? I don't really love any of them, but would like to find some solution that allows users to willingly share files with anonymous/public users.
I think public accessibility implying canCDN is the easiest fix here.
Basically the use case was that I dragged a screenshot onto the homepage, which made the file public, but then I couldn't share the direct image link.
Implying canCDN from public visibility should also fix any potential issues with Phragment, since you can just set the top level item to Public, tick the "recursive" option when editing policies, and then everything should work as expected.