Remove file size limit for loop file uploads
This commit is contained in:
parent
78dc5dd189
commit
ba8f4237da
@ -53,7 +53,7 @@ export default function UploadButton({
|
||||
return;
|
||||
}
|
||||
|
||||
if (file.size > type.maxSize) {
|
||||
if (type.maxSize > 0 && file.size > type.maxSize) {
|
||||
// the file is too big
|
||||
onError({
|
||||
type: 'size',
|
||||
|
||||
@ -15,7 +15,7 @@ import Filesize from '../../../misc/Filesize';
|
||||
import FormInlineButton from '../../../misc/FormInlineButton';
|
||||
import UploadButton from '../../../misc/UploadButton';
|
||||
|
||||
const imageTypes = [{ mimetype: 'audio/*', extension: 'audio', maxSize: 25 * 1024 * 1024 }];
|
||||
const imageTypes = [{ mimetype: 'audio/*', extension: 'audio', maxSize: 0 }];
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
gridContainer: {
|
||||
|
||||
@ -15,7 +15,7 @@ import Filesize from '../../../misc/Filesize';
|
||||
import FormInlineButton from '../../../misc/FormInlineButton';
|
||||
import UploadButton from '../../../misc/UploadButton';
|
||||
|
||||
const imageTypes = [{ mimetype: 'application/sdp', extension: '*.sdp', maxSize: 2 * 1024 * 1024 }];
|
||||
const fileTypes = [{ mimetype: 'application/sdp', extension: '*.sdp', maxSize: 2 * 1024 * 1024 }];
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
gridContainer: {
|
||||
@ -146,7 +146,7 @@ function Source({
|
||||
<Grid container alignItems="flex-start" spacing={2} className={classes.gridContainer}>
|
||||
<Grid item xs={12}>
|
||||
<Typography variant="caption">
|
||||
<Trans>Upload SDP file ({imageTypes.map((t) => t.mimetype).join(', ')}).</Trans>
|
||||
<Trans>Upload SDP file ({fileTypes.map((t) => t.mimetype).join(', ')}).</Trans>
|
||||
</Typography>
|
||||
</Grid>
|
||||
<Grid item xs={12} md={9}>
|
||||
@ -155,7 +155,7 @@ function Source({
|
||||
<Grid item xs={12} md={3}>
|
||||
<UploadButton
|
||||
label={<Trans>Upload</Trans>}
|
||||
acceptTypes={imageTypes}
|
||||
acceptTypes={fileTypes}
|
||||
onStart={handleUploadStart}
|
||||
onError={handleUploadError(<Trans>Uploading the file failed</Trans>)}
|
||||
onUpload={handleFileUpload}
|
||||
|
||||
@ -16,8 +16,8 @@ import FormInlineButton from '../../../misc/FormInlineButton';
|
||||
import UploadButton from '../../../misc/UploadButton';
|
||||
|
||||
const imageTypes = [
|
||||
{ mimetype: 'image/*', extension: 'image', maxSize: 2 * 1024 * 1024 },
|
||||
{ mimetype: 'video/*', extension: 'video', maxSize: 25 * 1024 * 1024 },
|
||||
{ mimetype: 'image/*', extension: 'image', maxSize: 0 },
|
||||
{ mimetype: 'video/*', extension: 'video', maxSize: 0 },
|
||||
];
|
||||
|
||||
const useStyles = makeStyles((theme) => ({
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user