Skip to content

Commit

Permalink
bump demo site size limit to 2GB from 250MB
Browse files Browse the repository at this point in the history
  • Loading branch information
ashfame committed Jan 14, 2025
1 parent 08a8b3e commit e9e1751
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ export const SCREENSHOT_WIDTH = 1040;
export const SCREENSHOT_HEIGHT = 1248;
export const LIMIT_OF_ZIP_SITES_PER_USER = 5;
export const LIMIT_OF_PROMPTS_PER_USER = 200;
export const DEMO_SITE_SIZE_LIMIT_MB = 250;
export const DEMO_SITE_SIZE_LIMIT_BYTES = DEMO_SITE_SIZE_LIMIT_MB * 1024 * 1024; // 250MB
export const DEMO_SITE_SIZE_LIMIT_GB = 2;
export const DEMO_SITE_SIZE_LIMIT_BYTES = DEMO_SITE_SIZE_LIMIT_GB * 1024 * 1024 * 1024; // 2GB
export const SYNC_PUSH_SIZE_LIMIT_GB = 2;
export const SYNC_PUSH_SIZE_LIMIT_BYTES = SYNC_PUSH_SIZE_LIMIT_GB * 1024 * 1024 * 1024; // 2GB
export const AUTO_UPDATE_INTERVAL_MS = 60 * 60 * 1000;
Expand Down
6 changes: 3 additions & 3 deletions src/hooks/use-archive-error-messages.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { sprintf } from '@wordpress/i18n';
import { useI18n } from '@wordpress/react-i18n';
import { useMemo } from 'react';
import { DEMO_SITE_SIZE_LIMIT_MB } from '../constants';
import { DEMO_SITE_SIZE_LIMIT_GB } from '../constants';

export function useArchiveErrorMessages() {
const { __ } = useI18n();
Expand All @@ -12,8 +12,8 @@ export function useArchiveErrorMessages() {
rest_site_limit_reached: __( 'Demo sites limit reached. Please, delete some demo sites.' ),
no_file: __( "We didn't receive the zip file. Please try uploading it again." ),
invalid_file_size: sprintf(
__( 'The file size exceeds the limit of %d MB. Please try reducing the site size.' ),
DEMO_SITE_SIZE_LIMIT_MB
__( 'The file size exceeds the limit of %d GB. Please try reducing the site size.' ),
DEMO_SITE_SIZE_LIMIT_GB
),
could_not_upload: __( 'There was an issue uploading the zip file.' ),
rest_cannot_view: __(
Expand Down
6 changes: 3 additions & 3 deletions src/hooks/use-archive-site.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as Sentry from '@sentry/electron/renderer';
import { sprintf } from '@wordpress/i18n';
import { useI18n } from '@wordpress/react-i18n';
import { useCallback, useEffect, useMemo } from 'react';
import { DEMO_SITE_SIZE_LIMIT_BYTES, DEMO_SITE_SIZE_LIMIT_MB } from '../constants';
import { DEMO_SITE_SIZE_LIMIT_BYTES, DEMO_SITE_SIZE_LIMIT_GB } from '../constants';
import { getIpcApi } from '../lib/get-ipc-api';
import { isWpcomNetworkError } from '../lib/is-wpcom-network-error';
import { useArchiveErrorMessages } from './use-archive-error-messages';
Expand Down Expand Up @@ -87,9 +87,9 @@ export function useArchiveSite() {
alert(
sprintf(
__(
'The site exceeds the maximum size of %dMB. Please remove some files and try again.'
'The site exceeds the maximum size of %dGB. Please remove some files and try again.'
),
DEMO_SITE_SIZE_LIMIT_MB
DEMO_SITE_SIZE_LIMIT_GB
)
);
setUploadingSites( ( _uploadingSites ) => ( { ..._uploadingSites, [ siteId ]: false } ) );
Expand Down

0 comments on commit e9e1751

Please sign in to comment.