mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-29 17:00:59 +01:00
Fix pastebin mimetypes.
Summary: PhabricatorFile() was setting the mimetype based on extension, meaning that you couldn't view the plain-text file if you saved a file, for example, as a .php. It would set the mimetype to "text/x-php; charset=us-ascii". In this commit, I force the mimetype to text/plain. Test Plan: Tried pasting a new file and was able to both see it via the pastebin viewer and in plain-text via File. Reviewers: epriestley CC: Differential Revision: 429
This commit is contained in:
parent
faee2d284f
commit
7734cab580
1 changed files with 1 additions and 0 deletions
|
@ -46,6 +46,7 @@ class PhabricatorPasteCreateController extends PhabricatorPasteController {
|
|||
$text,
|
||||
array(
|
||||
'name' => $title,
|
||||
'mime-type' => 'text/plain; charset=utf-8',
|
||||
));
|
||||
$paste->setFilePHID($paste_file->getPHID());
|
||||
$paste->setAuthorPHID($user->getPHID());
|
||||
|
|
Loading…
Reference in a new issue