Small cleanups in markdown drop/paste (#189985)

- Observer cancellation more places
- Create constants for mime types
- Making code more consistent to show duplication
This commit is contained in:
Matt Bierner
2023-08-08 16:27:21 -07:00
committed by GitHub
parent caebd5c3a7
commit 388d3683ea
6 changed files with 77 additions and 60 deletions

View File

@@ -0,0 +1,22 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
export const Mime = {
textUriList: 'text/uri-list',
textPlain: 'text/plain',
} as const;
export const mediaMimes = new Set([
'image/bmp',
'image/gif',
'image/jpeg',
'image/png',
'image/webp',
'video/mp4',
'video/ogg',
'audio/mpeg',
'audio/aac',
'audio/x-wav',
]);