@bindu-dashing/dam-solution-v2 5.8.48 → 5.8.49

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.
@@ -22,7 +22,6 @@ import { FileUploadStatus, NotificationStatus, } from "../utilities/constants/in
22
22
  import { get, keyBy, map, merge, values } from "lodash";
23
23
  import { DELETE_S3_FILE_URL, FILE_UPLOAD_URL, } from "../utilities/constants/apiUrls";
24
24
  import CustomLoader from "../common/loader/CustomLoader";
25
- import axios from "axios";
26
25
  import UploadStatusModal from "./UploadStatusModal";
27
26
  import { useDamConfig } from "../hocs/DamConfigContext";
28
27
  import { createApiClient } from "../hocs/configureAxios";
@@ -118,11 +117,14 @@ const AddDrive = () => {
118
117
  continue;
119
118
  }
120
119
  try {
121
- yield axios.put(fileUrl, file.file, {
120
+ // Use fetch instead of axios to avoid authorization headers for S3 presigned URL upload
121
+ yield fetch(fileUrl, {
122
+ method: "PUT",
122
123
  headers: {
123
124
  "Content-Type": get(file, "mimetype"),
124
125
  "Access-Control-Allow-Origin": "*",
125
126
  },
127
+ body: file.file,
126
128
  });
127
129
  updateFileStatus(get(file, "name"), FileUploadStatus.SUCCESS);
128
130
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bindu-dashing/dam-solution-v2",
3
- "version": "5.8.48",
3
+ "version": "5.8.49",
4
4
  "dependencies": {
5
5
  "@ant-design/icons": "^5.0.1",
6
6
  "@emoji-mart/data": "^1.2.1",