cancel
Showing results for 
Search instead for 
Did you mean: 

Do I need a custom content type?

robin_clarke
Champ in-the-making
Champ in-the-making
Hi,

I'm new to Alfresco and not sure what direction to take. My users need to created and manage content. A single entity of that content has the following fields:

    * Date
    * Title
    * Description
    * MP3 file
    * PDF file
We currently are on 3.3.

Should I aim to achieve this by creating a custom Content Types? Or Web Scripts? Or forms? Or is there something out of the box that I can use?

Any advice on direction would be appreciated.
Robin
4 REPLIES 4

jpotts
World-Class Innovator
World-Class Innovator
Welcome to the Alfresco community!

You appear to want a single node to contain two content streams (an MP3 file and a PDF file). This can be done through customization, but you might be better off using a folder to represent whatever this thing is, set the date, title, and description on the folder, then put the MP3 file and PDF file in the folder.

Alternatively you could define a custom type to be the main object and then use associations to point to the MP3 and PDF files.

The decision as to whether to use a folder or a custom type requires further discussion of the details. Knowing nothing else, I'd go with the folder idea because it will be easier to work with and requires less work.

To recap:
Option 1 (preferred): Instance of out-of-the-box folder is the main object. Children are the PDF and MP3, instances of OOTB content type.
Option 2a: Main object is an instance of a custom type that includes associations to the other two objects which are instances of content.
Option 2b: Main object is an instance of the out-of-the-box content type and adds an aspect. The associations are defined in the aspect.
Option 3: Main object is an instance of a custom type that defines an additional content property to hold the second content stream. This option will likely break (or at least require customization of) the out-of-the-box web user interfaces and will almost certainly break things like FTP, CIFS, WebDAV, etc., for instances of that object.

Hope that helps,

Jeff

robin_clarke
Champ in-the-making
Champ in-the-making
I like the sound of creating a Folder, and then adding the PDFs and MP3s to that folder.

Stupid question: How do I create a Folder? I go to Create > Create Content but there is no option to create a Folder.

I am using Alfresco Explorer 3.3

kaynezhang
World-Class Innovator
World-Class Innovator
Please use Create > Create Space

daniil
Champ in-the-making
Champ in-the-making

Hey robin.clarke _‌, did you manage to solve it via custom types?
I created a custom type using <type>d:content</type>, but how would I upload a file into that property via REST API?

I've tried encoding a PDF in base64 and passing that string as the property's value, but when I retrieve the node it says that the content is 0 bytes. Thanks!