Skip to content
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 an issue where unintended requests where sent when the wrong mimetype was dropped in a video dropzone #38

Merged
merged 1 commit into from
Aug 8, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions amigor/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion amigor/public/vendor/transmorpher/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"/transmorpher.js": "/transmorpher.js?id=87f85bfe73123b6a5abd7f638bd951ed",
"/transmorpher.js": "/transmorpher.js?id=1583a86bf2270919b4e8e6750dfbdf5c",
"/transmorpher.css": "/transmorpher.css?id=56dbb0cba726c3e63f1c109f6b9a6f1b",
"/icons/delete.svg": "/icons/delete.svg?id=f88179ccc3649c47f2264315be6c0421",
"/icons/enlargen.svg": "/icons/enlargen.svg?id=9f560ce3f022646dbb826a066715a343",
Expand Down
7 changes: 2 additions & 5 deletions amigor/public/vendor/transmorpher/transmorpher.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ if (!window.transmorpherScriptLoaded) {
dictDefaultMessage: medium.translations['drop_files_to_upload'],
dictFileTooBig: medium.translations['max_file_size_exceeded'],
dictInvalidFileType: medium.translations['invalid_file_type'],
createImageThumbnails: false,
init: function init() {
// Processing-Event is emitted when the upload starts.
this.on('processing', function () {
Expand Down Expand Up @@ -123,11 +124,7 @@ if (!window.transmorpherScriptLoaded) {
if (errorElement = this.element.querySelector('.dz-error')) {
errorElement.remove();
}

// Dropzone only emits the "thumbnail" event for images.
if (!file.type.match(/image.*/)) {
this.emit("thumbnail", file);
}
this.emit("thumbnail", file);
},
// Update database when upload was canceled manually.
canceled: function canceled(file) {
Expand Down
2 changes: 1 addition & 1 deletion dist/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"/transmorpher.js": "/transmorpher.js?id=87f85bfe73123b6a5abd7f638bd951ed",
"/transmorpher.js": "/transmorpher.js?id=1583a86bf2270919b4e8e6750dfbdf5c",
"/transmorpher.css": "/transmorpher.css?id=56dbb0cba726c3e63f1c109f6b9a6f1b",
"/icons/delete.svg": "/icons/delete.svg?id=f88179ccc3649c47f2264315be6c0421",
"/icons/enlargen.svg": "/icons/enlargen.svg?id=9f560ce3f022646dbb826a066715a343",
Expand Down
7 changes: 2 additions & 5 deletions dist/transmorpher.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ if (!window.transmorpherScriptLoaded) {
dictDefaultMessage: medium.translations['drop_files_to_upload'],
dictFileTooBig: medium.translations['max_file_size_exceeded'],
dictInvalidFileType: medium.translations['invalid_file_type'],
createImageThumbnails: false,
init: function init() {
// Processing-Event is emitted when the upload starts.
this.on('processing', function () {
Expand Down Expand Up @@ -123,11 +124,7 @@ if (!window.transmorpherScriptLoaded) {
if (errorElement = this.element.querySelector('.dz-error')) {
errorElement.remove();
}

// Dropzone only emits the "thumbnail" event for images.
if (!file.type.match(/image.*/)) {
this.emit("thumbnail", file);
}
this.emit("thumbnail", file);
},
// Update database when upload was canceled manually.
canceled: function canceled(file) {
Expand Down
6 changes: 2 additions & 4 deletions src/resources/js/transmorpher.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ if (!window.transmorpherScriptLoaded) {
dictDefaultMessage: medium.translations['drop_files_to_upload'],
dictFileTooBig: medium.translations['max_file_size_exceeded'],
dictInvalidFileType: medium.translations['invalid_file_type'],
createImageThumbnails: false,
init: function () {
// Processing-Event is emitted when the upload starts.
this.on('processing', function () {
Expand Down Expand Up @@ -108,10 +109,7 @@ if (!window.transmorpherScriptLoaded) {
errorElement.remove();
}

// Dropzone only emits the "thumbnail" event for images.
if (!file.type.match(/image.*/)) {
this.emit("thumbnail", file);
}
this.emit("thumbnail", file);
},
// Update database when upload was canceled manually.
canceled: function (file) {
Expand Down