Adrian Bannister
Adrian Bannister

Reputation: 523

Kentico upload a file using the API to a Page Type's File field

I have a page type (let's call it MyPageType) with a field PreviewImage that is of data type File.

I am trying to use the Kentico APIs to upload files from the server to that PreviewImage field on the MyPageType page type. From what I can see it seems that I have to upload the file somewhere and then the uploaded file will have a GUID that I can use for the PreviewImage field.

Upvotes: 0

Views: 388

Answers (1)

Trevor F
Trevor F

Reputation: 1437

https://docs.kentico.com/api11/content-management/attachments#Attachments-Insertingattachmentsintopagefields

Here's your API example from documentation to insert an attachment into a page type field.

Upvotes: 0

Related Questions