@edgestore/react 0.1.5-alpha.2 → 0.1.5-alpha.4
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/dist/index.js +3 -0
- package/dist/index.mjs +3 -0
- package/package.json +4 -4
- package/src/contextProvider.tsx +1 -0
- package/src/createNextProxy.ts +2 -0
package/dist/index.js
CHANGED
|
@@ -144,6 +144,8 @@ const uploadFileInner = async (file, uploadUrl, onProgressChange)=>{
|
|
|
144
144
|
const promise = new Promise((resolve, reject)=>{
|
|
145
145
|
const request = new XMLHttpRequest();
|
|
146
146
|
request.open('PUT', uploadUrl);
|
|
147
|
+
// This is for Azure provider. Specifies the blob type
|
|
148
|
+
request.setRequestHeader('x-ms-blob-type', 'BlockBlob');
|
|
147
149
|
request.addEventListener('loadstart', ()=>{
|
|
148
150
|
onProgressChange?.(0);
|
|
149
151
|
});
|
|
@@ -335,6 +337,7 @@ function EdgeStoreProviderInner({ children, context, basePath, maxConcurrentUplo
|
|
|
335
337
|
const json = await res.json();
|
|
336
338
|
await fetch(`${DEFAULT_BASE_URL}/_init`, {
|
|
337
339
|
method: 'GET',
|
|
340
|
+
credentials: 'include',
|
|
338
341
|
headers: {
|
|
339
342
|
'x-edgestore-token': json.token
|
|
340
343
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -120,6 +120,8 @@ const uploadFileInner = async (file, uploadUrl, onProgressChange)=>{
|
|
|
120
120
|
const promise = new Promise((resolve, reject)=>{
|
|
121
121
|
const request = new XMLHttpRequest();
|
|
122
122
|
request.open('PUT', uploadUrl);
|
|
123
|
+
// This is for Azure provider. Specifies the blob type
|
|
124
|
+
request.setRequestHeader('x-ms-blob-type', 'BlockBlob');
|
|
123
125
|
request.addEventListener('loadstart', ()=>{
|
|
124
126
|
onProgressChange?.(0);
|
|
125
127
|
});
|
|
@@ -311,6 +313,7 @@ function EdgeStoreProviderInner({ children, context, basePath, maxConcurrentUplo
|
|
|
311
313
|
const json = await res.json();
|
|
312
314
|
await fetch(`${DEFAULT_BASE_URL}/_init`, {
|
|
313
315
|
method: 'GET',
|
|
316
|
+
credentials: 'include',
|
|
314
317
|
headers: {
|
|
315
318
|
'x-edgestore-token': json.token
|
|
316
319
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edgestore/react",
|
|
3
|
-
"version": "0.1.5-alpha.
|
|
3
|
+
"version": "0.1.5-alpha.4",
|
|
4
4
|
"description": "Upload files with ease from React/Next.js",
|
|
5
5
|
"homepage": "https://edgestore.dev",
|
|
6
6
|
"repository": "https://github.com/edgestorejs/edgestore.git",
|
|
@@ -60,14 +60,14 @@
|
|
|
60
60
|
"uuid": "^9.0.0"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"@edgestore/server": "0.1.5-alpha.
|
|
63
|
+
"@edgestore/server": "0.1.5-alpha.4",
|
|
64
64
|
"next": "*",
|
|
65
65
|
"react": ">=16.8.0",
|
|
66
66
|
"react-dom": ">=16.8.0",
|
|
67
67
|
"zod": ">=3.0.0"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
|
-
"@edgestore/server": "0.1.5-alpha.
|
|
70
|
+
"@edgestore/server": "0.1.5-alpha.4",
|
|
71
71
|
"@types/cookie": "^0.5.1",
|
|
72
72
|
"@types/node": "^18.11.18",
|
|
73
73
|
"@types/uuid": "^9.0.1",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"typescript": "^5.1.6",
|
|
78
78
|
"zod": "^3.21.4"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "ae79c8b36dd3969ae3c0c3d5b8294961faf9e497"
|
|
81
81
|
}
|
package/src/contextProvider.tsx
CHANGED
package/src/createNextProxy.ts
CHANGED
|
@@ -216,6 +216,8 @@ const uploadFileInner = async (
|
|
|
216
216
|
const promise = new Promise<string | null>((resolve, reject) => {
|
|
217
217
|
const request = new XMLHttpRequest();
|
|
218
218
|
request.open('PUT', uploadUrl);
|
|
219
|
+
// This is for Azure provider. Specifies the blob type
|
|
220
|
+
request.setRequestHeader('x-ms-blob-type', 'BlockBlob');
|
|
219
221
|
request.addEventListener('loadstart', () => {
|
|
220
222
|
onProgressChange?.(0);
|
|
221
223
|
});
|