We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9740240 + 8d86b6b commit 4be048dCopy full SHA for 4be048d
1 file changed
cartridges/bm_cloudinary_pd/cartridge/static/default/experience/editors/cloudinary/mediaSelector.js
@@ -116,6 +116,12 @@
116
showError('Wrong asset type.');
117
} else {
118
isAssetRestricted(config.assetInfoUrl, asset).then(((restricted) => {
119
+ if (asset.resource_type === 'image') {
120
+ localStorage.setItem('imagePath', asset.public_id.substring(0, asset.public_id.lastIndexOf('/')));
121
+ } else {
122
+ localStorage.setItem('videoPath', asset.public_id.substring(0, asset.public_id.lastIndexOf('/')));
123
+ }
124
+
125
if (!restricted) {
126
emit({
127
type: 'sfcc:valid',
@@ -159,7 +165,7 @@
159
165
160
166
show.folder = {
161
167
resource_type: config.type,
162
- path: null
168
+ path: config.type === 'image' ? localStorage.getItem('imagePath') : localStorage.getItem('videoPath')
163
169
};
164
170
}
171
0 commit comments