Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/mixins/SharesMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
BUNDLED_PERMISSIONS,
} from '../lib/SharePermissionsToolBox.js'
import { COLLABORA_MIME_TYPES } from '../utils/CollaboraMimeTypes.js'
import { MEDIA_MIME_TYPES } from '../utils/MediaMimeTypes.js'

export default {
mixins: [SharesRequests, ShareTypes],
Expand Down Expand Up @@ -147,7 +148,7 @@
},
isPermissionEditAllowed() {
if (this.fileInfo.type === 'dir') return true
return !this.isPublicShare || COLLABORA_MIME_TYPES.includes(this.fileInfo.mimetype)
return !this.isPublicShare || COLLABORA_MIME_TYPES.includes(this.fileInfo.mimetype) || MEDIA_MIME_TYPES.includes(this.fileInfo.mimetype)
},
},

Expand All @@ -174,7 +175,7 @@
return true
},

/**

Check warning on line 178 in src/mixins/SharesMixin.js

View workflow job for this annotation

GitHub Actions / eslint

JSDoc @return declaration present but return expression not available in function
* @param {string} date a date with YYYY-MM-DD format
* @return {Date} date
*/
Expand Down
1 change: 0 additions & 1 deletion src/utils/CollaboraMimeTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ export const COLLABORA_MIME_TYPES = [
'application/vnd.visio',
'text/plain',
'text/markdown',
'image/png',
]
30 changes: 30 additions & 0 deletions src/utils/MediaMimeTypes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
export const MEDIA_MIME_TYPES = [
'image/jpeg',
'image/png',
'image/gif',
'image/bmp',
'image/tiff',
'image/x-icon',
'image/svg+xml',
'video/3gpp',
'video/x-msvideo',
'video/dv',
'video/x-flv',
'video/mp2t',
'video/mp4',
'video/quicktime',
'video/MP2T',
'video/mpeg',
'video/ogg',
'video/webm',
'image/webp',
'video/dvd',
'audio/flac',
'audio/mpegurl',
'audio/mp4',
'audio/m4b',
'audio/mpeg',
'audio/ogg',
'audio/wav',
'audio/x-scpls',
]
Loading