Creating new CMS.Attachment using REST

Brad Chapman asked on January 19, 2017 05:33

Hi there I am after some advice for the correct format for sending a request to Kentico REST for creating a CMS.Attachment object. I have followed the instructions at the below link:

I am getting a bad 400 request error.

I've tested by removing the 64 bit binary data string from the request and the request goes through fine so the problem appears to be with the <AttachmentBinary></AttachmentBinary> attribute, or rather, what I am sending via this attribute.

I am using .Net and populating the above attribute with Convert.ToBase64String(loAttachmentBinary) where loAttachmentBinary is a Byte() object of the source PDF file.

Some assistance would be great.

Cheers, Brad

Correct Answer

Brad Chapman answered on January 19, 2017 06:42


Problem was with the default size limitation with the REST requests. I needed to configure REST to allow larger request sizes.

Solution can be found here:

0 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.