Skip to content

Conversation

@designcode
Copy link
Contributor

No description provided.

@vercel
Copy link

vercel bot commented Sep 26, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
docs-redirect Ready Ready Preview Comment Sep 26, 2025 7:07pm
tigris-os-docs Ready Ready Preview Comment Sep 26, 2025 7:07pm

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Overview

Summary

This PR adds comprehensive documentation for SDK multipart upload functionality across three key files:

  • New multipart upload examples: Added complete server and client code examples showing the three-step multipart upload flow (init, get parts, complete)
  • Enhanced upload response documentation: Added details about the data properties returned on successful uploads (contentDisposition, contentType, modified, path, size, url)
  • API consistency improvements: Updated parameter names from method to operation in presigned URL examples for better consistency
  • Client-side configuration options: Documented new multipart: true and partSize options for the upload function

The changes provide developers with clear guidance on implementing large file uploads using Tigris multipart functionality, reducing bandwidth costs by enabling direct client-to-Tigris uploads.

Confidence Score: 4/5

  • This PR is generally safe to merge with one minor bug fix needed
  • Score reflects good documentation quality and consistency improvements, but reduced due to the error handling bug in examples.mdx that references undefined variable
  • docs/sdks/tigris/examples.mdx requires attention for the error handling bug fix

Important Files Changed

File Analysis

Filename        Score        Overview
docs/sdks/tigris/client-uploads.mdx 4/5 Added documentation for successful upload response properties and multipart parameter in example
docs/sdks/tigris/examples.mdx 3/5 Added comprehensive multipart upload examples but has error handling bug referencing wrong variable
docs/sdks/tigris/using-sdk.mdx 5/5 Updated parameter name from 'method' to 'operation' for presigned URLs for consistency

Sequence Diagram

sequenceDiagram
    participant Client as Client Browser
    participant Server as Next.js Server
    participant Tigris as Tigris Storage

    Client->>Server: POST /api/upload (action: MultipartInit, path)
    Server->>Tigris: initMultipartUpload(path)
    Tigris-->>Server: uploadId
    Server-->>Client: { data: { uploadId } }

    Client->>Server: POST /api/upload (action: MultipartGetParts, uploadId, parts)
    Server->>Tigris: getPartsPresignedUrls(path, parts, uploadId)
    Tigris-->>Server: presigned URLs for parts
    Server-->>Client: { data: presignedUrls }

    loop For each part
        Client->>Tigris: PUT to presigned URL (file chunk)
        Tigris-->>Client: ETag for part
    end

    Client->>Server: POST /api/upload (action: MultipartComplete, uploadId, partIds)
    Server->>Tigris: completeMultipartUpload(path, uploadId, partIds)
    Tigris-->>Server: final object metadata
    Server-->>Client: { data: { url, path, size, ... } }
Loading

3 files reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Xe
Xe previously approved these changes Sep 26, 2025
const result = await getPresignedUrl(path, {
method,
contentType,
operation: "put",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this supposed to be PUT?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not, it's lower-case put

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Xe
Xe previously approved these changes Sep 26, 2025
Xe
Xe previously approved these changes Sep 26, 2025
@designcode designcode merged commit 012ca02 into main Sep 26, 2025
10 checks passed
@designcode designcode deleted the feat/storage-sdk-client-multipart branch September 26, 2025 19:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants