Using DropZone to upload new collection image from app

kjdointhings
Excursionist
19 1 6

I'm working on a custom app for our in-house ecomm team to use. In the app, I've successfully rendered our 10 main collections, their title, image, and a DropZone component where our team will (hopefully) be able to upload a bunch of new collection images all from one page, rather than having to search and open each collection each time. I'm struggling with understanding how to get an image from the DropZone, and into the collection with the collectionUpdate mutation. The file returned from the DropZone is not something that can be uploaded. I've tried using window.URL.createObjectURL(file), which just produces a blob that doesn't work in the mutation (my mutation is working correctly when I pass it an absolute URL of an image in our shop files). Next I tried the stagedUploadsCreate mutation, but with no luck. Hoping someone can point me in the right direction here. Happy to provide more context if needed.

0 Likes