I’m migrating a load of content, about 15k worth of news stories to Discourse via the API and these topics have links to images in. The images have just been uploaded to blob storage and are fully accessible publicly.
Most topics have the images shown correctly and get hotlink downloaded and uploaded into Discourse as you’d expect. Some though either do not get past the point of showing as links in the topic, or end up getting shown as broken images for some reason.
Config is:
Virgin Discourse install just for testing the migration
S3 storage of images
I’ve had no problems just creating posts as a user and uploading issues, it seems to only occur when I migrating posts via the API, i.e. in bulk and in quick succession (am using the skip_validations=true parameter). So far I’ve only migrated a maximum of 1,000 topics before clearing down and starting again.
Any ideas for what might be causing this? Or any tips on how to diagnose? All the Hotlink Sidekiq jobs seem to schedule and run as you’d expect.
Thanks Robert. This is working for the first few I’ve tried. It’s going back to square one, i.e. rendering the hotlinked image, and then downloading/uploading it.
I’ll have to see if this can be automated, though it doesn’t get to the root cause of why they’re failing to start with.
That’s fantastic and congratulations, fortunately I learned that from other helpful people here when I’ve had similar issues and I’m happy I could pass it along to you
In the end this turned out not to be reliable, it would work for a few posts but not for all. I’ll have to have another go at trying to upload the images again. I had issues with this before with requests just hanging. I’m not sure if I tried the skip_validations parameter on those requests though.