Metadata-only asset creation | Community
Skip to main content
jimp38732070
Level 3
October 24, 2017
Solved

Metadata-only asset creation

  • October 24, 2017
  • 2 replies
  • 2166 views

Can I create an metadata-only asset?  Basically an asset record with metadata, but no asset object exists yet. Then later we update that record/asset with the actual file.  The use case is I'd like to create asset records before that actual finished good asset is ready.  That way I have an AssetID of the asset before there is an asset.

Thanks!

Jim P

AEM Assets ver. 6.3

Message was edited by: Jim Presley - added AEM version

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

edubey
edubeyAccepted solution
Level 10
October 25, 2017
jimp38732070
Level 3
October 25, 2017

That appears to need to reference a file though.

Asset is created by AssetManager and can be retrieved either via AssetManager or by adapting a asset Resource to an Asset.

     eg: // to create an asset AssetManager assetManager = resolver.adaptTo(AssetManager.class); Asset newAsset = assetManager.createAsset("/path/to/asset/document.pdf"); 

I'm thinking the system can't create an asset record without a file object to refer to.  I can accomplish what I need to do by creating a small file with the known final asset filename and ingest beforehand, then update with the real asset when ready.

Is that not correct?

Thanks!

Jim P