CenterForOpenScience / modular-file-renderer

A Python package for rendering files to HTML via an embeddable iframe
http://modular-file-renderer.readthedocs.io/en/latest/
Apache License 2.0
43 stars 67 forks source link

[SVCS-904] Use mime types not ext for gdrive files #352

Closed NyanHelsing closed 1 year ago

NyanHelsing commented 5 years ago

Ticket

https://openscience.atlassian.net/browse/SVCS-904

Purpose

wb puts an extension on gdrive files so it can tell mfr how to render them, and to tell fangorn what icon to use. Because of this, when a file gets renamed, wb doesn't send a path that matches up with where the old on was on a rename, causing the osf to thing the second half of the rename to actually be a create. This change makes it so wb will send the actual name of the file on the storage provider, rather than modifying it. This change means osf finds the old file when it gets renamed, and the old file is modified to match the rename. rather than creating a new file_node.

As a side effect, mfr needs to be updated to not rely on the extension that wb used to suffix on the path. That PR is here: https://github.com/CenterForOpenScience/modular-file-renderer/pull/352

Changes

Depends on wb pr: https://github.com/CenterForOpenScience/waterbutler/pull/367

Side effects

If multiple gdrive documents have the same name there may be some wierdness. Also

QA Notes

Deployment Notes