|
@@ -2,7 +2,8 @@ import axios from 'axios';
|
|
|
import { type PostSetTempData } from '../photos-api';
|
|
|
|
|
|
import { API } from '../../../../types';
|
|
|
-import { API_URL } from 'src/constants';
|
|
|
+import { API_URL, APP_VERSION } from 'src/constants';
|
|
|
+import { Platform } from 'react-native';
|
|
|
|
|
|
export const postSetUploadTemp = async (data: PostSetTempData) => {
|
|
|
const url = API_URL + '/' + API.UPLOAD_TEMP;
|
|
@@ -11,6 +12,10 @@ export const postSetUploadTemp = async (data: PostSetTempData) => {
|
|
|
formData.append('file', data.file as unknown as Blob);
|
|
|
|
|
|
const config = {
|
|
|
+ headers: {
|
|
|
+ Platform: Platform.OS,
|
|
|
+ 'App-Version': APP_VERSION
|
|
|
+ },
|
|
|
onUploadProgress: (progressEvent: ProgressEvent) => {
|
|
|
if (progressEvent.lengthComputable) {
|
|
|
const progress = progressEvent.loaded / progressEvent.total;
|