Issue with importing PDF files in Sanity dataset

5 replies
Last updated: Apr 1, 2020
I have an import with this structure:
- files
-- my doc.pdf
- import-pdf.ndjson
File path in import-pdf.ndjson

file@file://./files/my doc.pdf
It works when I compress it in import-pdf.tar.gz ->
sanity dataset import import-pdf.tar.gz test
But when I run it from import-pdf folder it doesn’t ->
sanity dataset import import-pdf.ndjson test

Error: Error while fetching asset from "file://./files/my doc.pdf":
File does not exist at the specified endpoint 
Apr 1, 2020, 10:36 AM
Files need to be the full path
Apr 1, 2020, 11:04 AM
(the path to the local image needs to be absolute, not relative)
Apr 1, 2020, 11:14 AM
☝️ better formulation 😄
Apr 1, 2020, 11:16 AM
all right, thanks 😉
Apr 1, 2020, 11:24 AM

Sanity– build remarkable experiences at scale

The Sanity Composable Content Cloud is the headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?

Categorized in