I’m working on a feature for the site that allows you to use an S3 bucket to host images. Presently, I’m expecting to use Digital Ocean’s S3 hosting to hold the images for this site, primarily because the setup is simpler.

The challenge is that this site is static in a git repo, but I don’t want to put the images into the repository. I want to reference the images in S3, and have it serve them via a URL that points directly to the bucket (or really the CDN proxy that sits in front of it). What I’d prefer is to specify where the image will be in the post content via URL, and then if the image doesn’t exist, I would be able to drag and drop an image onto the placeholder on the page. The server that serves this site would automatically upload the image to the specified destination and when you reload, the image appears.

There will be a little javascript necessary on the page template to make it this seamless, and I’ll need to add an endpoint to the server that allows the upload of files to the bucket in this way (with some authentication, of course), but I think it seems pretty doable. I may even use this post as a test balloon.