Hi! I am trying to store an unstructured content with one or more files as attachments. (That way I don’t need to store the files as separate contents.)
(I note that the ‘attachments’ param is not listed in the list of params, but just in the example code, where the param is not actually used)
Is it possible to add attachments upon creating content with the API, and do you have an example where this is used? Or is it not possible to save attachments to unstructured content?
I have tried creating content in the content studio with the AttachmentUploader input type, and see that the attachments are saved correctly then. The JSON blob I send is input is similar to the one saved using this method.
I was trying to do this based on feedback from @tsi on my formbuilder app, but I guess I will have to continue saving the attachment outside the content for now.
Or is it possible to do using the Java API? Since the AttachmentUploader works, I assume there is a way, as custom content types are basically unstructured content?
I think it should be supported in JS, unless there was a reason not to have it that I’m forgetting.
It’s too late to have it in 6.7. Maybe in 6.8, but someone else should confirm that.
It is possible to do it now using the Java API, look at ContentService.create() and CreateContentParams , CreateAttachments.
I often find myself syncing data from old external api’s.
The data typically become some js object which can be serialized as json.
Then some of the data gets cleaned up and stored as content so I can be queried, sorted, filtered, etc.
For debugging and other purposes it would be nice if I could store the raw data, or the json as attachment on the content.
Did this feature make it into 6.8?
If so are there any documentation on how to do it?