Viktoriia 4 months ago
parent
commit
ade9af5fd4
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/modules/api/photos/queries/use-post-set-upload-temp.tsx

+ 6 - 1
src/modules/api/photos/queries/use-post-set-upload-temp.tsx

@@ -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;