Skip to content

Commit 38ab4e4

Browse files
committed
Media: Remove required attribute from media uploader file input field.
This commit removes the required attribute from the file input element in the media uploader to avoid browser form validation issues and ensure that the form element is submitted correctly. Reviewed by cbravobernal. Merges [61320] to the 6.9 branch. Props adamsilverstein, ellatrix, desrosj, huzaifaalmesbah, immeet94, krupajnanda, madhavishah01, parthvataliya, ravichudasama01, sabernhardt, wildworks, yagniksangani. Fixes #64305. git-svn-id: https://develop.svn.wordpress.org/branches/6.9@61333 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 88fa3d9 commit 38ab4e4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wp-admin/includes/media.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2285,7 +2285,7 @@ function media_upload_form( $errors = null ) {
22852285
_ex( 'Upload', 'verb' );
22862286
?>
22872287
</label>
2288-
<input type="file" name="async-upload" id="async-upload" required />
2288+
<input type="file" name="async-upload" id="async-upload" />
22892289
<?php submit_button( _x( 'Upload', 'verb' ), 'primary', 'html-upload', false ); ?>
22902290
<a href="#" onclick="try{top.tb_remove();}catch(e){}; return false;"><?php _e( 'Cancel' ); ?></a>
22912291
</p>

0 commit comments

Comments
 (0)