naystack - v1.5.10
    Preparing search index...

    Function getFileUploadPutRoute

    • Returns the PUT route handler for file upload.

      Requires authentication (Bearer token, not refresh cookie). Expects multipart form data with fields: file (File), type (string), and optional data (JSON string).

      Parameters

      • options: SetupFileUploadOptions

        SetupFileUploadOptions (getKey, onUpload).

      • client: S3Client

        S3 client instance.

      Returns (
          req: NextRequest,
      ) => Promise<
          | NextResponse<{ error: string }>
          | NextResponse<{ onUploadResponse: object; url: string }>,
      >

      Async Next.js route handler for PUT requests.