@capillarytech/creatives-library 7.10.4 → 7.10.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/services/api.js +3 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "7.10.4",
4
+ "version": "7.10.6",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
package/services/api.js CHANGED
@@ -281,6 +281,9 @@ export const deleteAssetById = ({assetId, assetType}) => {
281
281
  };
282
282
 
283
283
  export const uploadFile = ({file, assetType, fileParams, mode, wechatParams}) => {
284
+ if ( (assetType || '').toLowerCase() === 'image' && fileParams && typeof(fileParams) === 'object' ) {
285
+ fileParams.isGeneratePreview = true;
286
+ }
284
287
  const data = new FormData();
285
288
  data.append('file', file);
286
289
  data.append('fileParam', JSON.stringify(fileParams));