mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-23 13:22:02 +03:00
16 lines
415 B
JavaScript
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 };
|