Skip to content

Location URL misses https:// #4196

@petersg83

Description

@petersg83

Describe the bug

When using S3.upload and upload a large file (~21Mo in my example) the url given by Location property misses the "HTTPS://" part .
I use Digital Ocean Spaces. I reached to them and said it is more likely coming from the sdk.

First console.log : small file (<1Mo)
Second console.log : large file (~21Mo)
DO spaces

Expected Behavior

I expect the Location url to contain the http protocol.

Current Behavior

The Location url doesn't contain the http protocol.

Reproduction Steps

The bug can be reproduced by using Strapi, the AWS upload provider and Digital Ocean Spaces. More details here: strapi/strapi#14288

The code using AWS is there: https://github.com/strapi/strapi/blob/main/packages/providers/upload-aws-s3/lib/index.js#L37

Possible Solution

It is possible it comes from a different way of setting the Location property depending on if the request is multipart or not.

Additional Information/Context

No response

SDK version used

Tried with 2.1209.0 and 2.1188.0

Environment details (OS name and version, etc.)

MacOS 12.5.1

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.p2This is a standard priority issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions