@amityco/ts-sdk-react-native 6.28.3-54dff84.0 → 6.28.3-7c09769.0
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/fileRepository/api/uploadImage.d.ts.map +1 -1
- package/dist/fileRepository/api/uploadVideo.d.ts.map +1 -1
- package/dist/index.cjs.js +13 -11
- package/dist/index.esm.js +13 -11
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
- package/src/fileRepository/api/uploadImage.ts +7 -5
- package/src/fileRepository/api/uploadVideo.ts +8 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploadImage.d.ts","sourceRoot":"","sources":["../../../src/fileRepository/api/uploadImage.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,WAAW,aACZ,QAAQ,0BACK,MAAM,KAAK,IAAI,kBACrC,QAAQ,MAAM,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"uploadImage.d.ts","sourceRoot":"","sources":["../../../src/fileRepository/api/uploadImage.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,WAAW,aACZ,QAAQ,0BACK,MAAM,KAAK,IAAI,kBACrC,QAAQ,MAAM,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC,CAyC7C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploadVideo.d.ts","sourceRoot":"","sources":["../../../src/fileRepository/api/uploadVideo.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,WAAW,aACZ,QAAQ,aACP,MAAM,eAAe,0BACT,MAAM,KAAK,IAAI,kBACrC,QAAQ,MAAM,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"uploadVideo.d.ts","sourceRoot":"","sources":["../../../src/fileRepository/api/uploadVideo.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,WAAW,aACZ,QAAQ,aACP,MAAM,eAAe,0BACT,MAAM,KAAK,IAAI,kBACrC,QAAQ,MAAM,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC,CA4C7C,CAAC"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -12100,16 +12100,17 @@ const uploadVideo = async (formData, feedType, onProgress) => {
|
|
|
12100
12100
|
const files = formData.getAll('files');
|
|
12101
12101
|
if (!files.length)
|
|
12102
12102
|
throw new Error('The formData object must have a `files` key.');
|
|
12103
|
+
const newFormDataWithMimeType = rebuildFormDataWithMimeType(formData);
|
|
12103
12104
|
const accessType = GlobalFileAccessType$1.getInstance().getFileAccessType();
|
|
12104
|
-
|
|
12105
|
-
|
|
12105
|
+
newFormDataWithMimeType.append('accessType', accessType);
|
|
12106
|
+
newFormDataWithMimeType.append('preferredFilename', files[0].name);
|
|
12106
12107
|
if (feedType) {
|
|
12107
|
-
|
|
12108
|
+
newFormDataWithMimeType.append('feedType', feedType);
|
|
12108
12109
|
}
|
|
12109
|
-
const headers = 'getHeaders' in
|
|
12110
|
-
?
|
|
12110
|
+
const headers = 'getHeaders' in newFormDataWithMimeType
|
|
12111
|
+
? newFormDataWithMimeType.getHeaders()
|
|
12111
12112
|
: { 'content-type': 'multipart/form-data' };
|
|
12112
|
-
const { data } = await client.http.post('/api/v4/videos',
|
|
12113
|
+
const { data } = await client.http.post('/api/v4/videos', newFormDataWithMimeType, {
|
|
12113
12114
|
headers,
|
|
12114
12115
|
onUploadProgress({ loaded, total = 100 }) {
|
|
12115
12116
|
onProgress && onProgress(Math.round((loaded * 100) / total));
|
|
@@ -12151,13 +12152,14 @@ const uploadImage = async (formData, onProgress) => {
|
|
|
12151
12152
|
const files = formData.getAll('files');
|
|
12152
12153
|
if (!files.length)
|
|
12153
12154
|
throw new Error('The formData object must have a `files` key.');
|
|
12155
|
+
const newFormDataWithMimeType = rebuildFormDataWithMimeType(formData);
|
|
12154
12156
|
const accessType = GlobalFileAccessType$1.getInstance().getFileAccessType();
|
|
12155
|
-
|
|
12156
|
-
|
|
12157
|
-
const headers = 'getHeaders' in
|
|
12158
|
-
?
|
|
12157
|
+
newFormDataWithMimeType.append('accessType', accessType);
|
|
12158
|
+
newFormDataWithMimeType.append('preferredFilename', files[0].name);
|
|
12159
|
+
const headers = 'getHeaders' in newFormDataWithMimeType
|
|
12160
|
+
? newFormDataWithMimeType.getHeaders()
|
|
12159
12161
|
: { 'content-type': 'multipart/form-data' };
|
|
12160
|
-
const { data } = await client.http.post('/api/v4/images',
|
|
12162
|
+
const { data } = await client.http.post('/api/v4/images', newFormDataWithMimeType, {
|
|
12161
12163
|
headers,
|
|
12162
12164
|
onUploadProgress({ loaded, total = 100 }) {
|
|
12163
12165
|
onProgress && onProgress(Math.round((loaded * 100) / total));
|
package/dist/index.esm.js
CHANGED
|
@@ -28172,16 +28172,17 @@ const uploadVideo = async (formData, feedType, onProgress) => {
|
|
|
28172
28172
|
const files = formData.getAll('files');
|
|
28173
28173
|
if (!files.length)
|
|
28174
28174
|
throw new Error('The formData object must have a `files` key.');
|
|
28175
|
+
const newFormDataWithMimeType = rebuildFormDataWithMimeType(formData);
|
|
28175
28176
|
const accessType = GlobalFileAccessType$1.getInstance().getFileAccessType();
|
|
28176
|
-
|
|
28177
|
-
|
|
28177
|
+
newFormDataWithMimeType.append('accessType', accessType);
|
|
28178
|
+
newFormDataWithMimeType.append('preferredFilename', files[0].name);
|
|
28178
28179
|
if (feedType) {
|
|
28179
|
-
|
|
28180
|
+
newFormDataWithMimeType.append('feedType', feedType);
|
|
28180
28181
|
}
|
|
28181
|
-
const headers = 'getHeaders' in
|
|
28182
|
-
?
|
|
28182
|
+
const headers = 'getHeaders' in newFormDataWithMimeType
|
|
28183
|
+
? newFormDataWithMimeType.getHeaders()
|
|
28183
28184
|
: { 'content-type': 'multipart/form-data' };
|
|
28184
|
-
const { data } = await client.http.post('/api/v4/videos',
|
|
28185
|
+
const { data } = await client.http.post('/api/v4/videos', newFormDataWithMimeType, {
|
|
28185
28186
|
headers,
|
|
28186
28187
|
onUploadProgress({ loaded, total = 100 }) {
|
|
28187
28188
|
onProgress && onProgress(Math.round((loaded * 100) / total));
|
|
@@ -28223,13 +28224,14 @@ const uploadImage = async (formData, onProgress) => {
|
|
|
28223
28224
|
const files = formData.getAll('files');
|
|
28224
28225
|
if (!files.length)
|
|
28225
28226
|
throw new Error('The formData object must have a `files` key.');
|
|
28227
|
+
const newFormDataWithMimeType = rebuildFormDataWithMimeType(formData);
|
|
28226
28228
|
const accessType = GlobalFileAccessType$1.getInstance().getFileAccessType();
|
|
28227
|
-
|
|
28228
|
-
|
|
28229
|
-
const headers = 'getHeaders' in
|
|
28230
|
-
?
|
|
28229
|
+
newFormDataWithMimeType.append('accessType', accessType);
|
|
28230
|
+
newFormDataWithMimeType.append('preferredFilename', files[0].name);
|
|
28231
|
+
const headers = 'getHeaders' in newFormDataWithMimeType
|
|
28232
|
+
? newFormDataWithMimeType.getHeaders()
|
|
28231
28233
|
: { 'content-type': 'multipart/form-data' };
|
|
28232
|
-
const { data } = await client.http.post('/api/v4/images',
|
|
28234
|
+
const { data } = await client.http.post('/api/v4/images', newFormDataWithMimeType, {
|
|
28233
28235
|
headers,
|
|
28234
28236
|
onUploadProgress({ loaded, total = 100 }) {
|
|
28235
28237
|
onProgress && onProgress(Math.round((loaded * 100) / total));
|