When I tried to upload a PDF file using
resp, err := c.client.Beta.Files.Upload(ctx, anthropic.BetaFileUploadParams{ File: file, Betas: []string{"files-api-2025-04-14"}, }, option.WithHeader("Content-Type","application/pdf"))
It returns {"type":"error","error":{"type":"invalid_request_error","message":"file: Field required"}.
But when I don't specify the content-type, the content-type will default to application/octet-stream, which cannot be specified in Message API because it will complain it doesn't support application/octet-stream.