I am trying to do this curl request into axios
curl -X PUT -H 'Content-Type: image/png' --upload-file /tmp/exponent_avatar-1615597420129 'https://storage.googleapis.com/PATH/Screenshot_43.png?X-Goog-Algorithm=&X-Goog-Credential=ServiceAccount&X-Goog-Date=20210313T010340Z&X-Goog-Expires=901&X-Goog-SignedHeaders=content-&X-Goog-Signature='
with this axios config
await axios
.put(url, path, {
headers: { "Content-Type": mimetype },
})
.then(async (data: any) => {
const signedUrl = await generateV4ReadSignedUrl(
fullRoute,
"read",
mimetype,
"GET"
);
resolve(signedUrl);
})
.catch((err: any) => {
reject(err);
});
path variable is the route of the temporary file route, I don't find the way to do it on axios with
--upload-file /tmp/exponent_avatar-1615597420129