How to post attachments to mattermost from jenkins ? ex: log file - jenkins

I am able to send url of the log but attachment is not working
getting below error:if i use attachments variable
WARNING: Unknown parameter(s) found for class type 'jenkins.plugins.mattermost.workflow.MattermostSendStep': attachments

Related

How to change key type from text to file like in Postman but in Insomia?

Aloha,
Question: How to change the key type from text to file like in Postman but in Insomnia?
Reference From Postman
Problem: Cannot test POST on localhost:8080/predict/upload.
Reason: Testing back-end to see if file type is jpeg.
Expectation: Insomnia to produce same results from Postman.
Tried: Used Form urlEncoded and Binary File to POST http://localhost:8080/predict/upload but received 400 bad request.
Reference From Insomnia
Thank you!

InvalidRequestContent in Postman when POSTing file

I am trying to upload a file and send it with a POST request. The backend is Powerautomate flow, but nothing, except the txt file, reaches it. If I try to upload (pdf, png, jpg…) it gives me the error code InvalidrequestContent and the message "The input body for trigger 'manual' of type 'Request' must be of type JSON, but was of type 'application/pdf'." - depending on the file format.
I tried different files and only the .txt file will return 204, otherwise 400 (files are very small - 4 bytes)
I tried to upload as binary as well as form-data. Any suggestions?

HTTP error 405 when trying to create an apload session with MS Graph API

I am trying to upload a large attachment with Microsoft Graph Rest API.
I am able to create an upload session and attach a large file > 3 Mo (file attachment) but when i try to create an upload session to attach an item with a size > 3 Mo to a mail, it fails with an error 405. The Reason is because i'm setting the attachment type to "item" instead of "file". When i try to POST to the API endpoint the Following payload (for testing):
{"AttachmentItem":{"attachmentType":"item","name":"flower","size":3483322}}
The response (with a 405 status) is:
{"error":{"code":"ErrorAttachmentSessionIsSupportedOnlyForFileAttachments","message":"Unsupported Attachment type specified. Only File attachments can be uploaded using an Upload Session.","innerError":{"date":"2020-12-09T16:03:11","request-id":"ded65db1-179f-45bd-89ba-e5527556f359","client-request-id":"f6befc74-8399-227d-3686-bf2a62297a44"}}}
Normally the "item" attachment type should be supported according to the documentation (https://learn.microsoft.com/en-us/graph/api/resources/attachmentitem?view=graph-rest-1.0).
Any clue on this ?
Thx

schema validation error occuring on localserver but not on github - Swagger

I am getting a schema validation error when i host my SWAGGER.JSON file on my local server that runs the swagger.html.
But, when i put the file in
https://raw.githubusercontent.com/novastorm123/abapswaggerNW7.0/master/swagger_70.json
It works.
I don't get any console error in both cases.
I treid to disable the online validator error from swagger.
I used
validatorUrl : null
But it is not working and i am still getting the error at the bottom of the page.
On clicking of the error i am getting the message
{"schemaValidationMessages":[{"level":"error","message":"Can't read from file
/api/swagger.json"}]}
Whenever i am pasting my JSON in the online editor, it is accepting it as a valid JSON Input

Amazon S3 : Access Denied for URL using symbols

I would like to download some files uploaded on my S3 Server.
For the moment, all my buckets and files inside them are public, so I can download what I want.
Unfortunately, I can't access to files using special characters like a space or "&"...
I tried to change the special characters in my URL by HTML code :
http://s3-eu-west-1.amazonaws.com/custom.bucket/mods/b&b.jar
by
http://s3-eu-west-1.amazonaws.com/custom.bucket/mods/b%26b.jar
But I always have the same error :
<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>3E987FCE07075166</RequestId>
<HostId>
O2EIujdbiAeYg44rsezQlargfT7qVSL8SpqbTxkd/1UwxQrwZ3SJ+R3NlHyGF7rI
</HostId>
</Error>
Anybody could resolve this problem ?
I can't rename them because there are used by other applications.
I am able to download public files with '&' in the name with no problems using curl:
curl https://s3.amazonaws.com/mybucket/test/b%26b.jar
Recheck the permissions on your file using the AWS console. Make sure the file has "Grantee: Everyone", and Open/Download permissions clicked, as in this screenshot:
Make sure to click the "save" button after you add these credentials. Alternatively, try using your security credentials.
I am able to download file with special character:
# wget --no-check-certificate https://s3-us-west-2.amazonaws.com/bucket1234/b%26b.jar
--2013-12-01 14:15:20-- https://s3-us-west-2.amazonaws.com/bucket1234/b%26b.jar
Resolving s3-us-west-2.amazonaws.com... 54.240.252.26
Connecting to s3-us-west-2.amazonaws.com|54.240.252.26|:443... connected.
WARNING: certificate common name `*.s3-us-west-2.amazonaws.com' doesn't match requested host name `s3-us-west-2.amazonaws.com'.
HTTP request sent, awaiting response... 200 OK
Length: 0 [application/x-java-archive]
Saving to: `b&b.jar'
[ <=> ] 0 --.-K/s in 0s
2013-12-01 14:15:22 (0.00 B/s) - `b&b.jar' saved [0/0]
Are you sure that this file is "Publicly visible"? could you double check the permissions for this file ? This is definitely not an issue with the special character.
Can you just login to aws s3 console and check what download link shows there?
Is there any mismatch in the link because of double encoding? Please make sure you are not doing any URL encoding from your code while uploading file.
In your case it could be:
http://s3-eu-west-1.amazonaws.com/custom.bucket/mods/b%2526b.jar

Resources