ecency-mobile/src/config/imageApi.js
2020-07-21 13:16:33 +03:00

16 lines
415 B
JavaScript

import axios from 'axios';
import Config from 'react-native-config';
function upload(fd, username, signature) {
const image = axios.create({
baseURL: `${Config.NEW_IMAGE_API}/hs/${signature}`, // Config.NEW_IMAGE_API
headers: {
Authorization: Config.NEW_IMAGE_API, // Config.NEW_IMAGE_API
'Content-Type': 'multipart/form-data',
},
});
return image.post('', fd);
}
export { upload };