Question:
If I import a file with wixClient.files.importFile
, then pass the ID as the heroImage
field in wixClient.draftPosts.createDraftPost
, then it complains that it’s not a valid URL. If I pass the URL, then the image is broken (it becomes e.g. https://static.wixstatic.com/media/https://static.wixstatic.com/media/ca2403_3f31b378fb8a4ba6b019de19ef4d0577~mv2.png
when it should obviously just be https://static.wixstatic.com/media/ca2403_3f31b378fb8a4ba6b019de19ef4d0577~mv2.png
). I think there is something broken in the SDK where it does new URL()
when it shouldn’t.
Product:
Wix SDK
What are you trying to achieve:
I’m trying to upload a post through the SDK, and it works fine, except for the hero image.
What have you already tried:
I tried the REST API, and it also has the same issue there, where it works, but the image is broken