AEM Assets download issue for custom assets | Community
Skip to main content
jitendra_m
Level 2
March 28, 2019
Solved

AEM Assets download issue for custom assets

  • March 28, 2019
  • 2 replies
  • 2351 views

Hi,

I am unable to download the custom assets from AEM assets console but I am able to download the same assets from damadmin.

Not sure if I am missing any configuration.

Thanks,

Jitendra

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

@arunpatidar We have a code which uses CQ Asset API to create assets in the DAM programmatically. Is the asset upload the only programmatic solution available now or Granite Assets API can be used. I don't want to go via AEM developer console to upload the assets due to time constraints. 

 

FYI @ritik_r 


here is the shell script example to upload assets in AEMaaCS

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/assets/admin/developer-reference-material-apis.html?lang=en#upload-assets-shell-script 

 

Deprecated asset upload APIs

The new upload method is supported only for Adobe Experience Manager as a Cloud Service. The APIs from Adobe Experience Manager 6.5 are deprecated. The methods related to upload or update assets or renditions (any binary upload) are deprecated in the following APIs:

  • Experience Manager Assets HTTP API
  • AssetManager Java API, like AssetManager.createAsset(..), AssetManager.createAssetForBinary(..), AssetManager.getAssetForBinary(..), AssetManager.removeAssetForBinary(..), AssetManager.createOrUpdateAsset(..), AssetManager.createOrReplaceAsset(..)

2 replies

arunpatidar
Community Advisor
Community Advisor
March 28, 2019

Ji,

Please check Download assets

Let us know what issue you are facing with screenshots, that would help.

Arun Patidar
jitendra_m
Level 2
March 28, 2019

Hi Arun,

We are uploading bulk assets into AEM from some other tool.

I have observed that I was using below asset manager api to create assets.

com.adobe.granite.asset.api.AssetManager

com.adobe.granite.asset.api.Asset asset = assetMgr.createAsset(absTargetPath);

But, the assets were uploaded with 0B size and that might be the reason why I was not able to download them in AEM asset console and also, they are not accessible directly on browser.

So, now I have used "com.day.cq.dam.api.AssetManager" api

com.day.cq.dam.api.Asset asset = assetMgr.createAsset(absTargetPath, is, mimeType, true);

Now, the assets are correctly uploaded with correct size and are now able to download as well.

I am not sure why granite Asset Manager api is not uploading assets properly but the reason I have used granite api is- I am doing the asset relation through code and I can only able to do that by using granite api, I am not sure if dam api has any option for creating asset relation.

AEM version : AEM 6.4

Thanks,

Jitendra

Level 2
January 15, 2024

HI @shankarram2407 
Please check 

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/assets/manage/add-assets.html?lang=en#upload-using-apis 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/upload-assets-into-cloud-storage-aem-as-cloud-service/m-p/544645 


@arunpatidar We have a code which uses CQ Asset API to create assets in the DAM programmatically. Is the asset upload the only programmatic solution available now or Granite Assets API can be used. I don't want to go via AEM developer console to upload the assets due to time constraints. 

 

FYI @ritik_r 

kautuk_sahni
Community Manager
Community Manager
January 15, 2024

@jitendra_m Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.

Kautuk Sahni