You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my mental model, the binaryReference param is exactly the same parameter as the name param in the corresponding getAttachmentStream() method in lib-content: https://developer.enonic.com/docs/xp/stable/api/lib-content#getattachmentstream
…just that it's named differently between the two libraries. It would clean up some confusion if at least the descriptions matched in the documentation for both these methods, so people understand that they work in the same way.
Also, the doc for both of these methods could do well with some explanation of what exactly a stream is, and examples for when you'd use it (i.e. when you want to fill a response body with the contents of a file)
The text was updated successfully, but these errors were encountered:
Hi. No, they are not the same at all. Attatchments in content API is a thing for handling files, with a bunch of properties and metadata. It is also available as a separate attachmentLib. Binaryreference is a special properyType for storing byte arrays. That Said, there might well be room for improvement :)
The parameter
binaryReference
has a very sparse and confusing description:https://developer.enonic.com/docs/xp/stable/api/lib-node#getbinary
In my mental model, the
binaryReference
param is exactly the same parameter as thename
param in the correspondinggetAttachmentStream()
method in lib-content:https://developer.enonic.com/docs/xp/stable/api/lib-content#getattachmentstream
…just that it's named differently between the two libraries. It would clean up some confusion if at least the descriptions matched in the documentation for both these methods, so people understand that they work in the same way.
Also, the doc for both of these methods could do well with some explanation of what exactly a stream is, and examples for when you'd use it (i.e. when you want to fill a response body with the contents of a file)
The text was updated successfully, but these errors were encountered: