@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.
- package/package.json +1 -1
- package/services/api.js +3 -0
package/package.json
CHANGED
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));
|