@adobe/acc-js-sdk 1.1.35 → 1.1.36
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/docs/changeLog.html +7 -0
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/src/client.js +11 -2
package/docs/changeLog.html
CHANGED
|
@@ -3,6 +3,13 @@ layout: page
|
|
|
3
3
|
title: Change Log
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
<section class="changelog"><h1>Version 1.1.36</h1>
|
|
7
|
+
<h2>2023/07/28</h2>
|
|
8
|
+
<li>
|
|
9
|
+
Fixed the `uploadAemAsset` method when used from a browser, using fetch for HTTP requests.
|
|
10
|
+
</li>
|
|
11
|
+
</section>
|
|
12
|
+
|
|
6
13
|
<section class="changelog"><h1>Version 1.1.35</h1>
|
|
7
14
|
<h2>2023/07/25</h2>
|
|
8
15
|
<li>
|
package/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/acc-js-sdk",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.36",
|
|
4
4
|
"lockfileVersion": 2,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@adobe/acc-js-sdk",
|
|
9
|
-
"version": "1.1.
|
|
9
|
+
"version": "1.1.36",
|
|
10
10
|
"license": "ISC",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"axios": "^1.2.1",
|
package/package.json
CHANGED
package/src/client.js
CHANGED
|
@@ -657,13 +657,22 @@ const fileUploader = (client) => {
|
|
|
657
657
|
if(headers['Authorization'] === undefined || headers['Authorization'] === '' || headers['Authorization'] === 'null') {
|
|
658
658
|
throw 'Bearer token is missing';
|
|
659
659
|
}
|
|
660
|
+
// Serialize json data (required for fetch)
|
|
661
|
+
const jsonData = JSON.stringify({
|
|
662
|
+
'assetDownloadUrl': assetDownloadUrl
|
|
663
|
+
});
|
|
660
664
|
|
|
661
|
-
|
|
665
|
+
var response = await client._makeHttpCall({
|
|
662
666
|
url: url,
|
|
663
667
|
method: 'POST',
|
|
664
|
-
data:
|
|
668
|
+
data: jsonData,
|
|
665
669
|
headers: headers
|
|
666
670
|
});
|
|
671
|
+
|
|
672
|
+
// response is returned as string when using fetch(in browser)
|
|
673
|
+
// & returned as json using axios(nodejs).
|
|
674
|
+
if(typeof response === 'string')
|
|
675
|
+
response = JSON.parse(response);
|
|
667
676
|
if(response.publishedURL)
|
|
668
677
|
return response;
|
|
669
678
|
else
|