Import Issue with Non-JSON Files

I have been trying to use the Import feature only available to the more expensive plans, but I'm having issues with it. At first, I was able to compress JSON files as well as either PNG's or PDF's into the same ZIP file, so that when I imported, it would recognize and upload those non-JSON files and associate them to the objects defined in the JSON files using the local path reference (per this article How to Import Content - Prismic). However, literally in the middle of working with the tool, this stopped working and has not worked since (I had successfully used the feature to complete one import and then moved on to the next immediately after and it was no longer recognizing non-JSON files).

Was something changed about the tool recently to disallow this? That doesn't seem to align with documentation. To clarify, I am not zipping a folder, but all the individual files (I know this is a common mistake, so clarifying now that that is not my issue). I have also tried restarting my browser, clearing the cache and restarting my computer, but none of those generic fixes solved the issue.

Hi @jared.z. As far as I’m aware, nothing should have changed with the Import tool recently.

Just to clarify one thing, the import will work as that article describes only with image files going into an Image field. This means that if you are trying to upload images or other file types and connect them to a Link field, it won’t work.

I also want to clarify that simply adding the files to the zip won’t add them to the Media Library. Only images being added to an Image field will work and be uploaded to the Media Library.

Is that possibly the issue here?

I’m 98% certain I had the tool recognizing non-JSON, non-image file types at some point when I was first working with the tool; of course, now I’m doubting myself, but I created templates for all the JSON types I would need to upload (including those with PDF’s) and I’m certain I did test runs for each template successfully before turning to import the actual data and running into issues eventually.

Regardless, I just created a simple “two file” ZIP file with one JSON file that references one included image file, per the documentation, and it does not recognize or pull the image file when I click Upload. I made sure to name the file something not already in the library just in case that was a feature, and it still is not seeing it. I also thought MAYBE having dashes in the image file name was throwing it off, but naming the image with only alphanumeric characters didn’t change anything either. Finally, I opened the ZIP file locally after zipping up the two files and can confirm both files were in the unzipped folder.

@jared.z Hmmm, I’m not sure what the issue might be off the top of my head. I’ll need to take a closer look. Can you send me the following?

  • The url of your Prismic repository
  • The zip file you mentioned above that isn’t working

If you don’t want to share this publicly you can send a direct message to the @Team-Education.

@jared.z I just tested the import zip that you sent in your private message and it worked exactly as expected.

Can you try it again? If it doesn’t work again, can you send any screenshots or error messages that will help us identify why it isn’t working for you?

I tested the import again and this is the result:

As you can see, there are no error messages; its just a “silent” failure. When I click “Check documents” , nothing changes. When I click “Import now!” in this situation, it still just imports the JSON; I thought perhaps it might also silently import the image, but that does not happen. I checked the Console and Network tabs in Dev Tools and that did not warrant any leads either; everything was successful.

I wanted to follow-up on this issue because I haven't heard anything in over a month and the last I tried this was still an issue. For now, all the data is loaded for what I was working on at the time, but a new round of data will be necessary soon and I would like to understand if this has been fixed or why I might be having this issue. Thank you.

@jared.z Sorry for the delayed response. This is very strange because when I test this using the exact zip file that you sent me it works just fine as you can see in this video:

At this point, I'm not sure why it isn't working for you, so I’ll have to pass it over to the @team-tech-support. Someone there will look into this as soon as they are able.

They will let you know if they have any followup questions when they pick this up from their queue. To help with their investigation, can you provide the following:

  • A screen recording of this issue
  • The browser(s) you've tried this with

Hello @jared.z could you please try the process and record your screen while doing it. At the end of the process could you open your document in a release to see what is the result of the import?
Thanks a lot,

This issue has been closed due to inactivity. Flag to reopen.