mirror of
https://github.com/kyantech/Palmr.git
synced 2025-10-31 20:13:44 +00:00
Compare commits
2 Commits
copilot/fi
...
copilot/fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c8b7654bcf | ||
|
|
84622adb45 |
@@ -80,7 +80,21 @@ export class S3StorageProvider implements StorageProvider {
|
|||||||
Key: objectName,
|
Key: objectName,
|
||||||
});
|
});
|
||||||
|
|
||||||
return await getSignedUrl(s3Client, command, { expiresIn: expires });
|
// Disable automatic checksum calculation for large file uploads
|
||||||
|
// This prevents the SDK from adding x-amz-checksum-* headers that may cause
|
||||||
|
// 400 Bad Request errors with S3-compatible providers like Wasabi for files > 10GB
|
||||||
|
// The unhoistableHeaders option prevents specific headers from being included in the presigned URL
|
||||||
|
return await getSignedUrl(s3Client, command, {
|
||||||
|
expiresIn: expires,
|
||||||
|
unhoistableHeaders: new Set([
|
||||||
|
"x-amz-checksum-crc32",
|
||||||
|
"x-amz-checksum-crc32c",
|
||||||
|
"x-amz-checksum-sha1",
|
||||||
|
"x-amz-checksum-sha256",
|
||||||
|
"x-amz-checksum-crc64nvme",
|
||||||
|
"x-amz-sdk-checksum-algorithm",
|
||||||
|
]),
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async getPresignedGetUrl(objectName: string, expires: number, fileName?: string): Promise<string> {
|
async getPresignedGetUrl(objectName: string, expires: number, fileName?: string): Promise<string> {
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ export function TwoFactorForm() {
|
|||||||
<CardDescription>{status.enabled ? t("twoFactor.enabled") : t("twoFactor.description")}</CardDescription>
|
<CardDescription>{status.enabled ? t("twoFactor.enabled") : t("twoFactor.description")}</CardDescription>
|
||||||
</CardHeader>
|
</CardHeader>
|
||||||
<CardContent className="space-y-4">
|
<CardContent className="space-y-4">
|
||||||
<div className="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4">
|
<div className="flex items-center justify-between">
|
||||||
<div>
|
<div>
|
||||||
<p className="font-medium">
|
<p className="font-medium">
|
||||||
{t("twoFactor.status.label")}{" "}
|
{t("twoFactor.status.label")}{" "}
|
||||||
@@ -133,29 +133,19 @@ export function TwoFactorForm() {
|
|||||||
</p>
|
</p>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-col sm:flex-row gap-2 w-full sm:w-auto">
|
<div className="flex gap-2">
|
||||||
{status.enabled ? (
|
{status.enabled ? (
|
||||||
<>
|
<>
|
||||||
<Button
|
<Button variant="outline" onClick={generateNewBackupCodes} disabled={isLoading}>
|
||||||
variant="outline"
|
|
||||||
onClick={generateNewBackupCodes}
|
|
||||||
disabled={isLoading}
|
|
||||||
className="w-full sm:w-auto"
|
|
||||||
>
|
|
||||||
<IconKey className="h-4 w-4" />
|
<IconKey className="h-4 w-4" />
|
||||||
{t("twoFactor.backupCodes.generateNew")}
|
{t("twoFactor.backupCodes.generateNew")}
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button variant="destructive" onClick={() => setIsDisableModalOpen(true)} disabled={isLoading}>
|
||||||
variant="destructive"
|
|
||||||
onClick={() => setIsDisableModalOpen(true)}
|
|
||||||
disabled={isLoading}
|
|
||||||
className="w-full sm:w-auto"
|
|
||||||
>
|
|
||||||
{t("twoFactor.buttons.disable2FA")}
|
{t("twoFactor.buttons.disable2FA")}
|
||||||
</Button>
|
</Button>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<Button onClick={startSetup} disabled={isLoading} className="w-full sm:w-auto">
|
<Button onClick={startSetup} disabled={isLoading}>
|
||||||
<IconShield className="h-4 w-4" />
|
<IconShield className="h-4 w-4" />
|
||||||
{t("twoFactor.buttons.enable2FA")}
|
{t("twoFactor.buttons.enable2FA")}
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Reference in New Issue
Block a user