fix: use correct Content-Type for template archive (#15410)

Fixes: https://github.com/coder/coder/issues/14124
This commit is contained in:
Marcin Tojek
2024-11-06 18:38:48 +01:00
committed by GitHub
parent 18c2386e9e
commit 17363098e2

View File

@ -1877,7 +1877,7 @@ class ApiMethods {
uploadFile = async (file: File): Promise<TypesGen.UploadResponse> => { uploadFile = async (file: File): Promise<TypesGen.UploadResponse> => {
const response = await this.axios.post("/api/v2/files", file, { const response = await this.axios.post("/api/v2/files", file, {
headers: { "Content-Type": "application/x-tar" }, headers: { "Content-Type": file.type },
}); });
return response.data; return response.data;