I have a flow for uploading videos where:
- I upload the file via stagedUpload
- then I use the fileCreate
For the originalSource
url, I provide the resourceUrl
that comes from the stageUpload mutation.
The issue is that if I also give a filename to fileCreate
, it throws an exception with the following message:
[{"field":["files","0","filename"],"message":"Provided filename extension must match original source."}]
I triple checked, I do indeed specify the correct extension. What I suspect happens is that the code checks the extension in the filename against the resourceUrl
value (this is just an assumption). If that’s the case, then it will never be a match since that url looks like: https://shopify-video-production-core-originals.storage.googleapis.com?external_video_id=<someId>
I can indeed specify the fileName
through the stagedUpload
mutation, and then it looks as expected in Shopify. BUT, I found this interaction and I think it’s not right