Skip to content

[media] upload tab #9731

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions modules/media/jsx/uploadForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,9 @@ class MediaUploadForm extends Component {
if (!this.isValidFileName(requiredFileName, fileName)) {
swal.fire(
'Invalid file name!',
'File name should begin with: ' + requiredFileName,
'Your file\'s base name should be: <code>'
+ requiredFileName +'</code>'
+ '<br>followed by the file extension.',
'error'
);
return;
Expand All @@ -282,8 +284,8 @@ class MediaUploadForm extends Component {
if (isDuplicate >= 0) {
swal.fire({
title: 'Are you sure?',
text: 'A file with this name already exists!\n '
+ 'Would you like to override existing file?',
text: 'A file with this name already exists!' + '\n'
+ 'Would you like to overwrite the existing file?',
type: 'warning',
showCancelButton: true,
confirmButtonText: 'Yes, I am sure!',
Expand All @@ -292,7 +294,7 @@ class MediaUploadForm extends Component {
if (isConfirm) {
this.uploadFile();
} else {
swal.fire('Cancelled', 'Your imaginary file is safe :)', 'error');
swal.fire('Cancelled', 'Your file was not overwritten', 'error');
}
}.bind(this));
} else {
Expand Down
Loading