fix file size limit
This commit is contained in:
@@ -1734,6 +1734,7 @@ export interface AppRelease {
|
||||
platform: AppReleasePlatform;
|
||||
version: string;
|
||||
versionCode: number;
|
||||
variant: string;
|
||||
fileName: string;
|
||||
storageKey: string;
|
||||
fileSize: string;
|
||||
@@ -1747,6 +1748,7 @@ export interface AppRelease {
|
||||
export interface AppUpdateCheckResponse {
|
||||
updateAvailable: boolean;
|
||||
latest?: AppRelease;
|
||||
variants?: AppRelease[];
|
||||
}
|
||||
|
||||
export async function fetchPublicAppReleases(platform?: AppReleasePlatform) {
|
||||
@@ -1768,9 +1770,11 @@ export async function checkAppUpdate(platform: AppReleasePlatform, versionCode:
|
||||
);
|
||||
}
|
||||
|
||||
export function buildAppReleaseDownloadUrl(platform: AppReleasePlatform, releaseId?: string) {
|
||||
export function buildAppReleaseDownloadUrl(platform: AppReleasePlatform, releaseId?: string, variant?: string) {
|
||||
const slug = platform.toLowerCase();
|
||||
return releaseId ? `/downloads/${slug}/${releaseId}` : `/downloads/${slug}`;
|
||||
if (releaseId) return `/downloads/${slug}/${releaseId}`;
|
||||
if (variant) return `/downloads/${slug}?variant=${encodeURIComponent(variant)}`;
|
||||
return `/downloads/${slug}`;
|
||||
}
|
||||
|
||||
export async function fetchAdminAppReleases(token: string, platform?: AppReleasePlatform) {
|
||||
@@ -1784,6 +1788,7 @@ export async function uploadAdminAppRelease(
|
||||
platform: AppReleasePlatform;
|
||||
version: string;
|
||||
versionCode: number;
|
||||
variant?: string;
|
||||
releaseNotes?: string;
|
||||
file: File;
|
||||
},
|
||||
@@ -1793,6 +1798,9 @@ export async function uploadAdminAppRelease(
|
||||
formData.append('platform', payload.platform);
|
||||
formData.append('version', payload.version.trim());
|
||||
formData.append('versionCode', String(payload.versionCode));
|
||||
if (payload.variant?.trim()) {
|
||||
formData.append('variant', payload.variant.trim());
|
||||
}
|
||||
if (payload.releaseNotes?.trim()) {
|
||||
formData.append('releaseNotes', payload.releaseNotes.trim());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user