403Webshell
Server IP : 104.21.74.147  /  Your IP : 216.73.217.154
Web Server : nginx/1.24.0
System : Linux wordpress-sites 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.1.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/rebeccaone.com/wp-content/plugins/convertplug/modules/assets/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/rebeccaone.com/wp-content/plugins/convertplug/modules/assets/js/admin-media.js
/* eslint-env jquery */
(function ($) {
	'use strict';
	// Uploading files
	let file_frame, attachment;
	_wpPluploadSettings.defaults.multipart_params.admin_page = 'import';
	$('.cp-import-style').on('click', function (event) {
		event.preventDefault();

		// If the media frame already exists, reopen it.
		if (file_frame) {
			file_frame.open();
			return;
		}

		// Create the media frame.
		file_frame = wp.media.frames.file_frame = wp.media({
			title: jQuery(this).data('uploader_title'),
			button: {
				text: jQuery(this).data('uploader_button_text'),
			},
			library: {
				type: 'application/zip',
			},
			multiple: false, // Set to true to allow multiple files to be selected
		});

		// When the file is selected, run a callback.
		const module = jQuery(this).data('module');
		file_frame.on('select', function () {
			// We set multiple to false so only get one file from the uploader
			attachment = file_frame.state().get('selection').first().toJSON();
			const file = attachment;
			const loader = jQuery('.cp-loader.spinner');
			loader.css('visibility', 'visible');
			const data = {
				action: 'cp_import_' + module,
				file,
				module,
				security_nonce: cplus_var_nonce.cp_import_nonce,
			};
			jQuery.ajax({
				url: ajaxurl,
				data,
				type: 'POST',
				dataType: 'JSON',
				success(result) {
					loader.css('visibility', 'hidden');
					const status = result.status;
					const desc = result.description;
					if (status === 'error') {
						swal('Error!', desc, 'error');
					} else {
						swal('Imported!', desc, 'success');
					}
					setTimeout(function () {
						window.location = window.location;
					}, 1000);
				},
			});
		});

		// Finally, open the modal
		file_frame.open();
	});
})(jQuery);

Youez - 2016 - github.com/yon3zu
LinuXploit