Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add new setContent method to ContentStore #533

Closed
lmtoo opened this issue Apr 23, 2021 · 1 comment
Closed

add new setContent method to ContentStore #533

lmtoo opened this issue Apr 23, 2021 · 1 comment

Comments

@lmtoo
Copy link

lmtoo commented Apr 23, 2021

ContentStore's setContent only support inputStream ,but can't get a WritableResource or OutputStream to write content,.
when I package a zip file , I have to wirte this to a file somewhere , and then read this file as Inputstream pass it to setContent ,
but when this zip file is too big , this will limit by local disk.

this method can defined like this :

WritableResource setContent(S property) or OutputStream setContent(S property)

@paulcwarren
Copy link
Owner

Hi @lmtoo,

I think you can actually do this today @lmtoo. ContentStore inherits from AssociativeStore that provides a Resource getResource(S entity) method. As long as an association exists this will return a WriteableResource. If an association doesn't yet exist you can create a resource with Resource Store.getResource(SID id) and associate it with AssociativeStore.associate(S entity, SID id).

Or am I missing something?

@lmtoo lmtoo closed this as completed Apr 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants