videosphere
    Preparing search index...

    Function isTempUploadObjectKeyForUser

    • Whether r2ObjectKey is under this user's presigned staging prefix. Keys are created by generateObjectKey in app/api/uploads/presign/route.ts: temp/uploads/{userId}/{timestamp}-{uuid}/{sanitizedFilename}.

      Rejects path traversal (.., backslashes) and userIds containing separators so temp/uploads/../other/ style keys cannot satisfy the check.

      Parameters

      • r2ObjectKey: string
      • userId: string

      Returns boolean