mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-20 19:08:21 +00:00
feat(video):add video file (#7394)
* feat(video):add video file * optimize code * optimize code * optimize code * add parameter
This commit is contained in:
@@ -10,7 +10,7 @@ import { CollaboratorsProvider } from './metadata';
|
||||
import { TagsProvider } from './tag/hooks';
|
||||
import { SimpleViewer } from '@seafile/sdoc-editor';
|
||||
|
||||
const { serviceURL, avatarURL, siteRoot, lang, mediaUrl, isPro } = window.app.config;
|
||||
const { serviceURL, avatarURL, siteRoot, lang, mediaUrl, isPro, fileServerRoot } = window.app.config;
|
||||
const { username, name } = window.app.userInfo;
|
||||
const {
|
||||
repoID, repoName, repoEncrypted, parentDir, filePerm,
|
||||
@@ -54,6 +54,7 @@ window.seafile = {
|
||||
isPro: isPro === 'True' ? true : false,
|
||||
mobileLogin,
|
||||
enableSeafileAI,
|
||||
fileServerRoot,
|
||||
};
|
||||
|
||||
const repoInfo = { encrypted: repoEncrypted, permission: filePerm, is_admin: isRepoAdmin };
|
||||
|
@@ -2533,6 +2533,8 @@ class SeadocDirView(APIView):
|
||||
entry["file_uuid"] = dirent_file_uuid
|
||||
elif file_type == 'file' and filetype not in (SEADOC, IMAGE):
|
||||
entry["file_uuid"] = dirent_file_uuid
|
||||
elif file_type == 'video' and filetype == VIDEO:
|
||||
entry["file_uuid"] = dirent_file_uuid
|
||||
else:
|
||||
continue
|
||||
entry["type"] = dtype
|
||||
@@ -2925,6 +2927,8 @@ class SeadocSearchFilenameView(APIView):
|
||||
suffixes = ['sdoc',]
|
||||
if search_type == 'file':
|
||||
suffixes = get_non_sdoc_file_exts()
|
||||
if search_type == 'video':
|
||||
suffixes = ['mp4', 'ogv', 'webm', 'mov',]
|
||||
if not suffixes:
|
||||
error_msg = 'search_type is not valid.'
|
||||
return api_error(status.HTTP_400_BAD_REQUEST, error_msg)
|
||||
|
Reference in New Issue
Block a user