@amityco/ts-sdk-react-native 7.33.1-0d1d5d54.0 → 7.33.1-27d2398.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.
|
@@ -9,11 +9,10 @@
|
|
|
9
9
|
* @param formData The data necessary to create a new {@link Amity.File<'image'>}
|
|
10
10
|
* @param onProgress The callback to track the upload progress
|
|
11
11
|
* @param altText The alt text for the image
|
|
12
|
-
* @param isFullImage Keeps the original image so `size=full` returns it instead of the large copy
|
|
13
12
|
* @returns The newly created {@link Amity.File<'image'>}
|
|
14
13
|
*
|
|
15
14
|
* @category File API
|
|
16
15
|
* @async
|
|
17
16
|
*/
|
|
18
|
-
export declare const uploadImage: (formData: FormData, onProgress?: ((percent: number) => void) | undefined, altText?: string
|
|
17
|
+
export declare const uploadImage: (formData: FormData, onProgress?: ((percent: number) => void) | undefined, altText?: string) => Promise<Amity.Cached<Amity.File<'image'>[]>>;
|
|
19
18
|
//# sourceMappingURL=uploadImage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uploadImage.d.ts","sourceRoot":"","sources":["../../../src/fileRepository/api/uploadImage.ts"],"names":[],"mappings":"AASA
|
|
1
|
+
{"version":3,"file":"uploadImage.d.ts","sourceRoot":"","sources":["../../../src/fileRepository/api/uploadImage.ts"],"names":[],"mappings":"AASA;;;;;;;;;;;;;;;GAeG;AAEH,eAAO,MAAM,WAAW,aACZ,QAAQ,0BACK,MAAM,KAAK,IAAI,yBAC5B,MAAM,KACf,QAAQ,MAAM,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC,CAuD7C,CAAC"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -17784,13 +17784,12 @@ const uploadVideo = async (formData, feedType, onProgress) => {
|
|
|
17784
17784
|
* @param formData The data necessary to create a new {@link Amity.File<'image'>}
|
|
17785
17785
|
* @param onProgress The callback to track the upload progress
|
|
17786
17786
|
* @param altText The alt text for the image
|
|
17787
|
-
* @param isFullImage Keeps the original image so `size=full` returns it instead of the large copy
|
|
17788
17787
|
* @returns The newly created {@link Amity.File<'image'>}
|
|
17789
17788
|
*
|
|
17790
17789
|
* @category File API
|
|
17791
17790
|
* @async
|
|
17792
17791
|
*/
|
|
17793
|
-
const uploadImage = async (formData, onProgress, altText
|
|
17792
|
+
const uploadImage = async (formData, onProgress, altText) => {
|
|
17794
17793
|
const client = getActiveClient();
|
|
17795
17794
|
client.log('file/uploadImage', formData);
|
|
17796
17795
|
const files = formData.getAll('files');
|
|
@@ -17811,10 +17810,6 @@ const uploadImage = async (formData, onProgress, altText, isFullImage) => {
|
|
|
17811
17810
|
}
|
|
17812
17811
|
const accessType = GlobalFileAccessType$1.getInstance().getFileAccessType();
|
|
17813
17812
|
formData.append('accessType', accessType);
|
|
17814
|
-
// skip if the caller already appended it, so the old FormData workaround keeps working
|
|
17815
|
-
if (isFullImage && !formData.getAll('fullImage').length) {
|
|
17816
|
-
formData.append('fullImage', 'true');
|
|
17817
|
-
}
|
|
17818
17813
|
const headers = 'getHeaders' in formData
|
|
17819
17814
|
? formData.getHeaders()
|
|
17820
17815
|
: { 'content-type': 'multipart/form-data' };
|
package/dist/index.esm.js
CHANGED
|
@@ -17765,13 +17765,12 @@ const uploadVideo = async (formData, feedType, onProgress) => {
|
|
|
17765
17765
|
* @param formData The data necessary to create a new {@link Amity.File<'image'>}
|
|
17766
17766
|
* @param onProgress The callback to track the upload progress
|
|
17767
17767
|
* @param altText The alt text for the image
|
|
17768
|
-
* @param isFullImage Keeps the original image so `size=full` returns it instead of the large copy
|
|
17769
17768
|
* @returns The newly created {@link Amity.File<'image'>}
|
|
17770
17769
|
*
|
|
17771
17770
|
* @category File API
|
|
17772
17771
|
* @async
|
|
17773
17772
|
*/
|
|
17774
|
-
const uploadImage = async (formData, onProgress, altText
|
|
17773
|
+
const uploadImage = async (formData, onProgress, altText) => {
|
|
17775
17774
|
const client = getActiveClient();
|
|
17776
17775
|
client.log('file/uploadImage', formData);
|
|
17777
17776
|
const files = formData.getAll('files');
|
|
@@ -17792,10 +17791,6 @@ const uploadImage = async (formData, onProgress, altText, isFullImage) => {
|
|
|
17792
17791
|
}
|
|
17793
17792
|
const accessType = GlobalFileAccessType$1.getInstance().getFileAccessType();
|
|
17794
17793
|
formData.append('accessType', accessType);
|
|
17795
|
-
// skip if the caller already appended it, so the old FormData workaround keeps working
|
|
17796
|
-
if (isFullImage && !formData.getAll('fullImage').length) {
|
|
17797
|
-
formData.append('fullImage', 'true');
|
|
17798
|
-
}
|
|
17799
17794
|
const headers = 'getHeaders' in formData
|
|
17800
17795
|
? formData.getHeaders()
|
|
17801
17796
|
: { 'content-type': 'multipart/form-data' };
|