I'm trying to export an earth engine image to asset with an asset id that is a combination of string and number.
var assetId = 'projects/dashboard/assets/recent_mtch'; //
var ID = ee.Number(1231).format();
var assetId_imgNew = ee.String(assetId).cat(ID);
var assetId_image = 'projects/dashboard/assets/recent_mtch1231'
// This doesn't work
Export.image.toAsset({
image: exampleImage,
description: 'image_export',
scale: 500,
assetId: assetId_imgNew
});
// Somehow this works
Export.image.toAsset({
image: exampleImage,
description: 'image_export',
scale: 500,
assetId: assetId_image
});
The 'assetId_imgNew' and 'assetId_image' trigger different responses: the former failed to export with the error message: "Please provide an asset ID. Invalid JSON payload received", while the latter works.
Can you please point out what I am missing here?