Skip to content

Commit

Permalink
Refactor: Remove cover video support (#7751)
Browse files Browse the repository at this point in the history
  • Loading branch information
pauloiankoski authored Feb 21, 2025
1 parent 2876666 commit 2d507f5
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ export default function UploadMedia({id, value, onChange, label, actionLabel, re
// Get media attachment details from the frame state
var attachment = frame.state().get('selection').first().toJSON();

if (!attachment.type || attachment.type !== 'image') {
alert(__('Please select an image file only.', 'give'));
frame.open();
return;
}

onChange(attachment.url, attachment.alt);
});

Expand Down

0 comments on commit 2d507f5

Please sign in to comment.