Ребята, уже проделывал с видео, теперь пробую с фото. Как грамотно загрузить фотку в formData, переслать по сокетам юзеру и у него сохранить в cameraRoll?
let localUri = path;
let filename = localUri.split('/').pop();
// Infer the type of the image
let match = /\.(\w+)$/.exec(filename);
let type = 'image/png';
let formData = new FormData();
formData.append('image', { uri: localUri, name: filename, type });
const { socket } = this.props;
const { id } = this.props.route.params;
socket.emit('saveShot', { formData, id })