Dropbox recently removed its public folder feature, which was used to host my blog's images. I have to figure out a solution to host and fix the paths to these images…
Dropbox announced that As of March 15, 2017 the Public folder in your Dropbox account has been converted into a standard folder. Sad, all my previous links are hosted on Dropbox, and they all become invalid URLs.
I figured that I have to use another image hosting service. After some searching online, Cloundinary seems to be a good option. One design of my hosted images are that they are organized in sub-folders under a 'blog' folder. This means that if I want to seamlessly convert the links, I need to preserve the folder structure too.
Cloudinary seems to suggest they support auto-creating folders. Unfortunately that does not quite work for me.
In fact, I wrote a small script to do this.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | |
With that, I did a simple sed run on all my post sources:
1 | |
then rake preview. Boom! All the images are shown again!
via
No comments:
Post a Comment