ntk-cms-api 20.25.31 → 20.25.32

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.
@@ -9014,9 +9014,14 @@ class ContactContentService extends ApiCmsServerBase {
9014
9014
  return 'ContactContent';
9015
9015
  }
9016
9016
  ServiceImportPreview(file) {
9017
- return this.http
9018
- .post(this.getBaseUrl() + this.getModuleControllerUrl() + '/import/preview', { file }, {
9019
- headers: this.getHeaders(),
9017
+ const formData = new FormData();
9018
+ formData.append('file', file, file.name);
9019
+ const headers = this.getHeaders();
9020
+ // Remove Content-Type header to let browser set it automatically with boundary for FormData
9021
+ delete headers['Content-Type'];
9022
+ return this.http
9023
+ .post(this.getBaseUrl() + this.getModuleControllerUrl() + '/import/preview', formData, {
9024
+ headers: headers,
9020
9025
  })
9021
9026
  .pipe(retry(this.configApiRetry), map((ret) => {
9022
9027
  return ret;