DEV Community

Cover image for How I Automated My Photo Backup (So I Don’t Have to Pay for Cloud Storage or Manually Upload Every Time)
Mukul Singh
Mukul Singh

Posted on

How I Automated My Photo Backup (So I Don’t Have to Pay for Cloud Storage or Manually Upload Every Time)

You know that sinking feeling when your phone suddenly flashes, “Storage full!” again? Yup, I was there last week. My Google Drive told me it was full too. 🤦‍♂️

I had a cool 29 GB worth of photos and videos scattered between iCloud and Google Drive, but neither could hold much more. Plus, I wasn’t too keen on forking out ₹500+ every month just to buy more space from Apple or Google. Why pay for more when I can build my own?

So here’s the story of how I became my own cloud hero — with a little API magic and iPhone shortcuts.

Step 1: The Problem

  • Tons of photos/videos piling up
  • No more free cloud storage
  • Paying for extra storage? No, thanks 😅
  • Manually uploading? Nope, not gonna happen every time

Step 2: The DIY solution

I built a custom API on my own server that acts like a gatekeeper for uploads. Here’s what it does:

  • Takes my credentials so only I can send data
  • Accepts files as objects and safely stores them in my cloud
  • Has built-in security with token-based access so no creepy strangers can sneak in
  • Has rate limits and timeouts because nobody likes getting spammed

Then, on my iPhone, I created a shortcut automation to bridge the gap:

  • It looks inside my selected photo album (for demo, I picked the Recent album)
  • It grabs either the latest new photo or a bunch of them if needed
  • It does a POST request to my API’s /upload endpoint — basically sending my photos over
  • And when done? It pings me a notification to say, Hey, all’s uploaded!

Step 3: Customization for real life

  • I can tell this shortcut to run only when 100 new photos pile up (so it doesn’t spam uploads)
  • Or schedule it for certain days, like backup every Sunday night
  • Or run it while charging so it doesn’t kill my battery
  • There’s even a master switch for daily backups if I want

Step 4: Is it perfect?

Does it work smoothly? Yes! It only uploads images and videos, no fuss. I literally don’t have to lift a finger now.

And security? Locked down tight with tokens and limits.

Why did I do all this?

Because frankly, no one wants to manually upload hundreds of photos, and who wants to keep handing over ₹500+ monthly for space they could have on their own terms? No offense Apple/Google, but my wallet says no. 😄

What’s next on my list?

Building a slick gallery UI to display all these uploaded photos on my server, something that feels as clean and easy-going as the native Photos app on my phone. Still a work in progress, but pretty darn excited about it! 🤓✊

What can you do now?

If you made it this far, drop a like or share some quirky tech hacks that make your life better. Maybe even a weird but useful automation? I love reading these! And hey, if you enjoyed the story, a repost would mean a lot. Let’s spread that DIY tech mojo! 😄

Top comments (0)