这是indexloc提供的服务,不要输入任何密码
Skip to content

fire a preflight request before uploading artifacts #956

@promer94

Description

@promer94

Describe the feature you'd like to request

i just built my own turborepo cache server with nextjs and it works well locally.
But when i try to deploy it on vercel, i find many upload requests failed beacause of 5MB body size limit.
I try to set 307 status to redirect the upload request to s3 endpoint directly but it does not work.

If the client can preflight HEAD request to the cache server and get the upload endpoint from it, then the artifacts will not need to pass through the cache server at all. I think it will make the server implmentation easier.

Describe the solution you'd like

flowchart TD
   A[HEAD /v8/artifact/hash] --> B{cache server};
    B -- new endpoint in header --> C[PUT /newEndpoint];
    B -- No --> D[PUT /v8/artifact/hash];
Loading

Describe alternatives you've considered

NA

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions