Site name: https://nifty-meitner-cd6d46.netlify.app
I’ve been experimenting with the netlify API, it seems like the file paths that i use in the uploadDeployFile API call aren’t being saved properly.
For example, here is the result of an uploadDeployFile api call:
id: ‘_next/static/chunks/main-a3a79aff3ff232b41814.js’,
path: ‘_next/static/chunks/main-a3a79aff3ff232b41814.js’,
sha: ‘679be3d4bdda69ae20631f0caed192d2b18efe4c’,
mime_type: ‘application/javascript’,
size: 62760
then, when i use the getSiteFileByPathName api call, i get a 404 not found response:
here is the url that i am using for that call:
https://api.netlify.com/api/v1/sites/54cffbf6-3ecb-4e5f-be7f-ee8fa84f9761/files/_next/static/chunks/main-a3a79aff3ff232b41814.js
Additionally, when i do the listSiteFiles api call, i get this response:
{
“id”: “/main-a3a79aff3ff232b41814.js”,
“path”: “/main-a3a79aff3ff232b41814.js”,
“sha”: “679be3d4bdda69ae20631f0caed192d2b18efe4c”,
“mime_type”: “application/javascript”,
“size”: 62760,
“site_id”: “54cffbf6-3ecb-4e5f-be7f-ee8fa84f9761”,
“deploy_id”: “6104749616b0980a166f75d5”
},
as you can see in the path, the file path does not match the original PUT request when uploading the file.
Am i doing something wrong in the initial request? The request seems correct.