@rossmitchell @fahimmurshed @a2hostingrj
I investigated the issue and found that below code of plugin-install.php is responsible for display ZIP file
upload Form.
function install_plugins_upload() {
?>
<div class="upload-plugin">
<p class="install-help"><?php _e( 'If you have a plugin in a .zip format, you may install it by uploading it here.' ); ?></p>
<form method="post" enctype="multipart/form-data" class="wp-upload-form" action="<?php echo self_admin_url( 'update.php?action=upload-plugin' ); ?>">
<?php wp_nonce_field( 'plugin-upload' ); ?>
<label class="screen-reader-text" for="pluginzip"><?php _e( 'Plugin zip file' ); ?></label>
<input type="file" id="pluginzip" name="pluginzip" />
<?php submit_button( __( 'Install Now' ), '', 'install-plugin-submit', false ); ?>
</form>
</div>
<?php
}
Below code of class-file-upload-upgrader.php
is responsible for upload handle.
public function __construct( $form, $urlholder ) {
if ( empty( $_FILES[ $form ]['name'] ) && empty( $_GET[ $urlholder ] ) ) {
wp_die( __( 'Please select a file' ) );
}
..............
}
Here $_FILES[ $form ][‘name’] is empty, has no value.
Could anyone say why it is happening ?