This commit is contained in:
Amruth Pillai
2026-03-04 23:06:23 +01:00
parent 4b46bda4e6
commit 27edc963ce
4 changed files with 896 additions and 478 deletions
+1 -2
View File
@@ -1,7 +1,6 @@
import { apiKey } from "@better-auth/api-key";
import { drizzleAdapter } from "@better-auth/drizzle-adapter";
import { BetterAuthError } from "better-auth";
import { betterAuth } from "better-auth/minimal";
import { BetterAuthError, betterAuth } from "better-auth";
import { type GenericOAuthConfig, genericOAuth, openAPI, twoFactor } from "better-auth/plugins";
import { username } from "better-auth/plugins/username";
import { and, eq, or } from "drizzle-orm";
@@ -8,7 +8,6 @@ import {
S3Client,
} from "@aws-sdk/client-s3";
import { env } from "@/utils/env";
import { logger } from "@/utils/logger";
interface StorageWriteInput {
key: string;
@@ -90,9 +89,6 @@ interface ProcessedImage {
export async function processImageForUpload(file: File): Promise<ProcessedImage> {
const fileBuffer = await file.arrayBuffer();
logger.debug("Image processing feature flag resolved", {
flagDisableImageProcessing: env.FLAG_DISABLE_IMAGE_PROCESSING,
});
if (env.FLAG_DISABLE_IMAGE_PROCESSING) {
return {
data: new Uint8Array(fileBuffer),