[Hippo-cms7-user] associating a binary file with a document

Ard Schrijvers a.schrijvers at onehippo.com
Fri Aug 14 09:48:27 CEST 2009


Hello,

Normally, we do not store binaries in the document itself, but we
store them in assets/images. Then, from a document, we either link to
these binaries through some link picker, or, in xinha area, we create
a link or choose an image from the binaries. As Shane points out
really short, it is a facetselect (which a linkpicker uses). This
makes a 'mirror' to the binary.

Also do note, that in assets/images, the binary is part of a document.
This way, you can also define meta data on the binary, or have many
versions of one and the  same image (default thumbnail and default
sized).

The advantage of having binaries located somewhere is, is reuse. Many
documents can link to the same binary. This is in general our
preferred content model.

However, currently, I am working for a customer who *needs* to have
the binaries part of the document he's editing, as binaries are only
allowed to be visible through this document, and when this document is
taken off-line, the binary must be taken off-line as well. Then, there
is a 1-1 relation. In that case, you can choose for the 'resource' BE
template type, which results in an upload form in your BE template.
Unfortunately, the uploading itself of a binary into a document is
currently broken, but, will be fixed on short notice as a large
customer needs this.

So, regarding your use case, you have to consider one of these models
(where the first one is more efficient (less internal copying of
binaries), and more general, and the second serves some really
specific usecase). Hope this helps

Regards Ard

On Fri, Aug 14, 2009 at 12:42 AM, chadmichael<chadmichaeldavis at gmail.com> wrote:
>
> If I want to define a document type that has as one of it's attributes an
> uploaded binary file of some sort, how do I do that?
> --
> View this message in context: http://n2.nabble.com/associating-a-binary-file-with-a-document-tp3441313p3441313.html
> Sent from the Getting Started mailing list archive at Nabble.com.
> _______________________________________________
> Hippo-cms7-user mailing list and forums
> http://www.onehippo.org/cms7/support/community.html
>



More information about the Hippo-cms7-user mailing list