mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-08 18:30:53 +00:00
add-blocksize-settings (#3877)
This commit is contained in:
@@ -2,7 +2,7 @@ import React, { Fragment } from 'react';
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import Resumablejs from '@seafile/resumablejs';
|
import Resumablejs from '@seafile/resumablejs';
|
||||||
import MD5 from 'MD5';
|
import MD5 from 'MD5';
|
||||||
import { enableResumableFileUpload } from '../../utils/constants';
|
import { enableResumableFileUpload, resumableUploadFileBlockSize } from '../../utils/constants';
|
||||||
import { seafileAPI } from '../../utils/seafile-api';
|
import { seafileAPI } from '../../utils/seafile-api';
|
||||||
import { Utils } from '../../utils/utils';
|
import { Utils } from '../../utils/utils';
|
||||||
import { gettext } from '../../utils/constants';
|
import { gettext } from '../../utils/constants';
|
||||||
@@ -66,7 +66,7 @@ class FileUploader extends React.Component {
|
|||||||
testChunks: this.props.testChunks || false,
|
testChunks: this.props.testChunks || false,
|
||||||
headers: this.setHeaders || {},
|
headers: this.setHeaders || {},
|
||||||
withCredentials: this.props.withCredentials || false,
|
withCredentials: this.props.withCredentials || false,
|
||||||
chunkSize: this.props.chunkSize,
|
chunkSize: parseInt(resumableUploadFileBlockSize) * 1024 * 1024 || 1 * 1024 * 1024,
|
||||||
simultaneousUploads: this.props.simultaneousUploads || 1,
|
simultaneousUploads: this.props.simultaneousUploads || 1,
|
||||||
fileParameterName: this.props.fileParameterName,
|
fileParameterName: this.props.fileParameterName,
|
||||||
generateUniqueIdentifier: this.generateUniqueIdentifier,
|
generateUniqueIdentifier: this.generateUniqueIdentifier,
|
||||||
|
@@ -36,6 +36,7 @@ export const enableResetEncryptedRepoPassword = window.app.pageOptions.enableRes
|
|||||||
export const isEmailConfigured = window.app.pageOptions.isEmailConfigured === 'True';
|
export const isEmailConfigured = window.app.pageOptions.isEmailConfigured === 'True';
|
||||||
export const enableUploadFolder = window.app.pageOptions.enableUploadFolder === 'True';
|
export const enableUploadFolder = window.app.pageOptions.enableUploadFolder === 'True';
|
||||||
export const enableResumableFileUpload = window.app.pageOptions.enableResumableFileUpload === 'True';
|
export const enableResumableFileUpload = window.app.pageOptions.enableResumableFileUpload === 'True';
|
||||||
|
export const resumableUploadFileBlockSize = window.app.pageOptions.resumableUploadFileBlockSize;
|
||||||
export const storages = window.app.pageOptions.storages; // storage backends
|
export const storages = window.app.pageOptions.storages; // storage backends
|
||||||
export const enableRepoSnapshotLabel = window.app.pageOptions.enableRepoSnapshotLabel;
|
export const enableRepoSnapshotLabel = window.app.pageOptions.enableRepoSnapshotLabel;
|
||||||
export const shareLinkPasswordMinLength = window.app.pageOptions.shareLinkPasswordMinLength;
|
export const shareLinkPasswordMinLength = window.app.pageOptions.shareLinkPasswordMinLength;
|
||||||
|
@@ -64,6 +64,7 @@
|
|||||||
isEmailConfigured: '{{ is_email_configured }}',
|
isEmailConfigured: '{{ is_email_configured }}',
|
||||||
enableUploadFolder: '{{ enable_upload_folder }}',
|
enableUploadFolder: '{{ enable_upload_folder }}',
|
||||||
enableResumableFileUpload: '{{ enable_resumable_fileupload }}',
|
enableResumableFileUpload: '{{ enable_resumable_fileupload }}',
|
||||||
|
resumableUploadFileBlockSize: '{{ resumable_upload_file_block_size }}',
|
||||||
// storage backends
|
// storage backends
|
||||||
storages: (function () {
|
storages: (function () {
|
||||||
// for 'create repo' & 'storage backend' column in 'my libs'
|
// for 'create repo' & 'storage backend' column in 'my libs'
|
||||||
|
@@ -1256,6 +1256,7 @@ def react_fake_view(request, **kwargs):
|
|||||||
'seafile_collab_server': SEAFILE_COLLAB_SERVER,
|
'seafile_collab_server': SEAFILE_COLLAB_SERVER,
|
||||||
'storages': get_library_storages(request),
|
'storages': get_library_storages(request),
|
||||||
'enable_repo_snapshot_label': settings.ENABLE_REPO_SNAPSHOT_LABEL,
|
'enable_repo_snapshot_label': settings.ENABLE_REPO_SNAPSHOT_LABEL,
|
||||||
|
'resumable_upload_file_block_size': settings.RESUMABLE_UPLOAD_FILE_BLOCK_SIZE,
|
||||||
'share_link_expire_days_default': settings.SHARE_LINK_EXPIRE_DAYS_DEFAULT,
|
'share_link_expire_days_default': settings.SHARE_LINK_EXPIRE_DAYS_DEFAULT,
|
||||||
'share_link_expire_days_min': SHARE_LINK_EXPIRE_DAYS_MIN,
|
'share_link_expire_days_min': SHARE_LINK_EXPIRE_DAYS_MIN,
|
||||||
'share_link_expire_days_max': SHARE_LINK_EXPIRE_DAYS_MAX,
|
'share_link_expire_days_max': SHARE_LINK_EXPIRE_DAYS_MAX,
|
||||||
|
Reference in New Issue
Block a user