increase the MAX_DESCRIPTION_LENGTH of media_attachment

This commit is contained in:
bgme 2024-01-19 06:59:11 +08:00
parent caf015faca
commit 58f6e4c36a
2 changed files with 3 additions and 3 deletions

View file

@ -374,12 +374,12 @@ class FocalPointModal extends ImmutablePureComponent {
>
<FormattedMessage id='upload_modal.detect_text' defaultMessage='Detect text from picture' />
</button>
<CharacterCounter max={1500} text={detecting ? '' : description} />
<CharacterCounter max={65536} text={detecting ? '' : description} />
</div>
<Button
type='submit'
disabled={!dirty || detecting || isUploadingThumbnail || length(description) > 1500 || is_changing_upload}
disabled={!dirty || detecting || isUploadingThumbnail || length(description) > 65536 || is_changing_upload}
text={intl.formatMessage(is_changing_upload ? messages.applying : messages.apply)}
/>
</form>

View file

@ -37,7 +37,7 @@ class MediaAttachment < ApplicationRecord
enum type: { image: 0, gifv: 1, video: 2, unknown: 3, audio: 4 }
enum processing: { queued: 0, in_progress: 1, complete: 2, failed: 3 }, _prefix: true
MAX_DESCRIPTION_LENGTH = 1_500
MAX_DESCRIPTION_LENGTH = 65_536
IMAGE_LIMIT = 16.megabytes
VIDEO_LIMIT = 99.megabytes