Hi Miguel

Generally, [i][b]i[/b][/i] usually prefer storing "assets" in DAM over storing 
them in another workspace (e.g. website).
DAM makes it easier to reuse the asset for different purposes. A DAM asset also 
provides already a bunch of fields ... which you may not need them all, but 
since they are already there, ...

When it comes to your content app which is using a BasicUploadFieldDefinition 
right now ...
... you could change it in the following way: Replace the 
BasicUploadFieldDefinition with a LinkField to choose an asset from DAM. This 
way you store a reference to an asset from DAM instead of uploading the binary.
=> For an example see 
https://documentation.magnolia-cms.com/display/DOCS/My+first+content+app

The relevant part for the field in your dialog:
[code]              
- name: image
  class: info.magnolia.ui.form.field.definition.LinkFieldDefinition
  targetWorkspace: dam
  appName: assets
  label: Select image
  identifierToPathConverter:
    class: 
info.magnolia.dam.app.assets.field.translator.AssetCompositeIdKeyTranslator
  contentPreviewDefinition:
    contentPreviewClass: info.magnolia.dam.app.ui.field.DamFilePreviewComponent
[/code]

i hope this helps :-)
cheers, Christoph

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=9e3e7e72-dc57-4827-a82c-7d885e5c1bb3


----------------------------------------------------------------
For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to