Hello,
I'm trying to attach a report to an alert using a command similar to this one:
`./opsgenie-lamp_v3.1.4 attachFile --id "alias123" --identifier alias --fileName report.html --apiKey 123 --filePath .`
But I'm getting this message:
2024/04/19 16:30:42 INFO: Logging to file is disabled, To enable Logging to file Please specify logPath in configuration
INFO[2024-04-19T16:30:42.442047-03:00] Client is configured with ApiUrl: api.opsgenie.com, LogLevel: info, RetryMaxCount: 4
ERRO[2024-04-19T16:30:42.95022-03:00] Error occurred with Status code: 413, Message: Current request is not a multipart request, Took: 0.001000, RequestId: 867cd55a-75ac-4cc0-b59f-524757d80c22
2024/04/19 16:30:42 ERROR : Error occurred with Status code: 413, Message: Current request is not a multipart request, Took: 0.001000, RequestId: 867cd55a-75ac-4cc0-b59f-524757d80c22
Did I miss something or am I doing something wrong?
Hi @Marcos Alano ,
It looks like the attachment may exceed the file size limit of 2 MB. can you try again with a file that is under 2 MB?
https://support.atlassian.com/opsgenie/docs/add-a-note-or-attachment-to-an-alert/#Add-Attachments
I will accept your answer, but I found the problem. The file I was trying to upload had a typo, so virtually the file didn't exist. But thank you. Maybe improve the error message for edge cases, like missing file and file two big?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for confirming and for posting your solution, @Marcos Alano
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.