Invalid Content-Type header
Closed this issue · 4 comments
I have a workflow which runs on release, but when I create a pre-release, it is not able to upload the given file, stating "Invalid Content-Type ''". But by reading the Readme and source files, I know that Content-Type: application/zip
(which is the mime type of the file I'm uploading) is added as a default. Can you please help me how to fix this?
Below is the snippet from Docker log.
https://uploads.github.com/repos/pavi2410/AIX-Action/releases/17777351/assets?name=tk.pavi2410.aix
{"message":"Invalid Content-Type: ''","request_id":"924E:7E0D:5E1F0:6B453:5CF6AD53"}
Hey @pavi2410 👋 Can you share your main.workflow
file please? I'm guessing its setting a second argument that's overwriting the default mime type. These docs show that the second argument is used:
action "Upload to release" {
args = "my-image.tar application/zip"
}
Yes, here it is: https://github.com/pavi2410/AIX-Action/blob/master/.github/main.workflow
As you can see, I have set one arg for the file path only.
I was able to get the file to upload by explicitly specifying the content type. But I get this
https://uploads.github.com/repos/pavi2410/AIX-Action/releases/19078588/assets?name=tk.pavi2410.aix
{"message":"Validation Failed","request_id":"BFE6:1785:15AEF8:1D221C:5D482555","documentation_url":"https://developer.github.com/v3","errors":[{"resource":"ReleaseAsset","code":"already_exists","field":"name"}]}
Any idea?
It seems that updating a release on Github triggers the action "on release". So, the file was already uploaded and hence this error.