You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the scaleway_object resource only accepts a generic metadata map. When trying to set the HTML content type (for example, to render an HTML page in a bucket website), using:
metadata={
content-type ="text/html"
}
results in the provider sending x-amz-meta-content-type: text/html instead of setting the actual HTTP Content-Type header. As a result, browsers receive a default Content-Type (such as application/octet-stream), which causes the HTML file to be downloaded rather than rendered.
In contrast, when using the Scaleway Console, adding a metadata key content-type with the value text/html properly sets the HTTP header on the object.
Community Note
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
As a complement, there is no need to set the metadata content-type = text/html via the console if the index.html file has been put via the console. It is automatically rendered and not downloaded.
Description
Currently, the scaleway_object resource only accepts a generic metadata map. When trying to set the HTML content type (for example, to render an HTML page in a bucket website), using:
results in the provider sending
x-amz-meta-content-type: text/html
instead of setting the actual HTTP Content-Type header. As a result, browsers receive a default Content-Type (such asapplication/octet-stream
), which causes the HTML file to be downloaded rather than rendered.In contrast, when using the Scaleway Console, adding a metadata key
content-type
with the valuetext/html
properly sets the HTTP header on the object.Community Note
Affected Resource(s)
Terraform Configuration Files
The text was updated successfully, but these errors were encountered: