-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: [AXIMST-510] there is no message if a user upload a large file #183
Conversation
@@ -57,4 +57,4 @@ export const COURSE_BLOCK_NAMES = /** @type {const} */ ({ | |||
component: { id: 'component', name: 'Component' }, | |||
}); | |||
|
|||
export const UPLOAD_FILE_MAX_SIZE = 100 * 1024 * 1024; // 100mb | |||
export const UPLOAD_FILE_MAX_SIZE = 20 * 1000 * 1000; // 20mb |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I have a file with such size as shown on the picture it will 20312736
.
In that time if I set 20 * 1024 * 1024
it results in 20971520
. This means that 20312736
is valid size. But when I upload to the server I receive 413
error that means the file is too large.
The solution is to set 20 * 1000 * 1000
that works good for both backend and frontend.
be93e22
to
f8ec3b0
Compare
f8ec3b0
to
deca896
Compare
} finally { | ||
setDisabledUploadBtn(true); | ||
setUploadProgress(0); | ||
setPreviewUrl(null); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ill take this approach with finally into account:)
@@ -43,6 +44,11 @@ const ModalDropzone = ({ | |||
onChange, onCancel, onClose, fileTypes, onSavingStatus, | |||
}); | |||
|
|||
const invalidSizeMore = intl.formatMessage( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nit]
const invalidSizeMore = intl.formatMessage( | |
const invalidSizeMoreMsg = intl.formatMessage( |
…183) * fix: [AXIMST-510] there is no message if a user upload a large file * fix: after review * fix: add translations --------- Co-authored-by: monteri <lansevermore>
…183) * fix: [AXIMST-510] there is no message if a user upload a large file * fix: after review * fix: add translations --------- Co-authored-by: monteri <lansevermore>
…183) * fix: [AXIMST-510] there is no message if a user upload a large file * fix: after review * fix: add translations --------- Co-authored-by: monteri <lansevermore>
…183) * fix: [AXIMST-510] there is no message if a user upload a large file * fix: after review * fix: add translations --------- Co-authored-by: monteri <lansevermore>
…183) * fix: [AXIMST-510] there is no message if a user upload a large file * fix: after review * fix: add translations --------- Co-authored-by: monteri <lansevermore>
https://youtrack.raccoongang.com/issue/AXIMST-489/uploadlimit-there-is-no-message-if-a-user-upload-a-large-file