HomePhabricator

When creating a File storage object for a Paste, try to give it the same name…

Description

When creating a File storage object for a Paste, try to give it the same name as the Paste

Summary:
Ref T13528. Paste data is stored in files, but the files are always named "raw.txt".

Now that Paste provides a hint to use Files for "DocumentEngine" rendering, try to use the same name as the paste instead.

Test Plan:

  • Created a paste named "staggering-insight.ipynb".
  • Clicked "View as Jupyter Notebook" from Paste.
  • Saw a file named "staggering-insight.ipynb", not "raw.txt".
  • Created a paste with no name, saw a file named "raw-paste-data.txt" get created.

Maniphest Tasks: T13528

Differential Revision: https://secure.phabricator.com/D21197