Previews

Yarkon will show a preview of some file types in a dedicated right pane. The file types supported are all that can be shown natively by a modern web browser (eg, Chrome).

Why is preview not working?

A common misconception is that the type of a file is determined by its extension. While this is usually true when a file is stored in a local hard drive, this is not the case when a web browser accesses and opens a file from a remote site. For (obvious) security reasons, the web browser cannot simply assume that a file is actually an image (for instance), just based on its extension. Instead, the web browser relies on the content type of the file. Documents stored in AWS S3 use a metadata field named content-type to communicate this information to the web browser. A web browser - or a web application running in a browser, like Yarkon - will only show a file preview if the aforementioned content-type is properly set (there are no "workarounds" here, it is either properly set, or not). With S3, the content-type is set when the file is uploaded. Yarkon, and other proper S3 clients, will handle this correctly, but we have encountered other software that fails to do so, resulting in what appears to be a "broken" preview.

To verify that your documents have the proper content-type set, check out the metadata field. Here is an example of a PDF file - in this case, the content-type is set to application/pdf, which tells the browser that it should be using the PDF utility to preview it in place.

Content type of a document