allow non video selection when not odysee

This commit is contained in:
zeppi 2021-04-14 13:45:45 -04:00 committed by Sean Yesmunt
parent 9415d9c05d
commit fe69ef2c90

View file

@ -1,5 +1,5 @@
// @flow // @flow
import { SITE_NAME, WEB_PUBLISH_SIZE_LIMIT_GB } from 'config'; import { SITE_NAME, WEB_PUBLISH_SIZE_LIMIT_GB, SIMPLE_SITE } from 'config';
import type { Node } from 'react'; import type { Node } from 'react';
import * as ICONS from 'constants/icons'; import * as ICONS from 'constants/icons';
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
@ -512,13 +512,13 @@ function PublishFile(props: Props) {
{fileSelectSource === SOURCE_UPLOAD && showFileUpload && ( {fileSelectSource === SOURCE_UPLOAD && showFileUpload && (
<> <>
<FileSelector <FileSelector
label={__('Video file')} label={SIMPLE_SITE ? __('Video file') : __('File')}
disabled={disabled} disabled={disabled}
currentPath={currentFile} currentPath={currentFile}
onFileChosen={handleFileChange} onFileChosen={handleFileChange}
// https://stackoverflow.com/questions/19107685/safari-input-type-file-accept-video-ignores-mp4-files // https://stackoverflow.com/questions/19107685/safari-input-type-file-accept-video-ignores-mp4-files
accept="video/mp4,video/x-m4v,video/*" accept={SIMPLE_SITE ? 'video/mp4,video/x-m4v,video/*' : undefined}
placeholder={__('Select video file to upload')} placeholder={SIMPLE_SITE ? __('Select video file to upload') : __('Select a file to upload')}
/> />
{getUploadMessage()} {getUploadMessage()}
</> </>
@ -617,8 +617,7 @@ function PublishFile(props: Props) {
currentPath={currentFile} currentPath={currentFile}
onFileChosen={handleFileChange} onFileChosen={handleFileChange}
// https://stackoverflow.com/questions/19107685/safari-input-type-file-accept-video-ignores-mp4-files // https://stackoverflow.com/questions/19107685/safari-input-type-file-accept-video-ignores-mp4-files
accept="video/mp4,video/x-m4v,video/*" placeholder={__('Select file to upload')}
placeholder={__('Select video file to upload')}
/> />
)} )}
{showFileUpload && ( {showFileUpload && (