← All posts

How to Change the File Behind a QR Code Without Reprinting It

SteadyLink ·

A QR code stores a URL, not a file. If that URL always serves the current version of your file, you can change the file as often as you like and the printed code keeps working. With SteadyLink, you encode the file's stable link in the QR code, then use Replace whenever the menu, flyer, or manual changes.

What a QR code actually contains

A QR code is a picture of some text. For most printed codes that text is a web address. When someone scans it, their phone reads the address and opens it in a browser. The phone does not know or care what is on the other end.

That means the code itself can never be edited after printing, but what the address serves can be. The problem is that most file hosting gives each upload its own address. Upload a new menu and you get a new link, which means a new QR code, which means reprinting table cards, posters, packaging, or business cards.

There are two common ways around this:

  • A redirect service. The QR code points at a short link you control, and you change where that short link sends people. This works, but it adds a hop, and you still need somewhere to host the file.
  • A stable file link. The QR code points straight at the file's permanent address, and you replace the file behind it. One service, no redirect to manage.

This guide covers the second approach.

Set it up once

  1. Upload the file to SteadyLink. Choose Upload in the dashboard, pick a bucket, and set the file so anyone with the link can open it. A QR code that opens a private file will not work for people scanning it.
  2. Copy the file's link. It has the form https://cdn.steadylink.io/a/ASSET_ID.
  3. Paste that link into any QR code generator and download the code as an image, ideally SVG or a large PNG for print.
  4. Scan the code with two or three different phones before you print. Check that it opens the file you expect.
  5. Print.

The link contains the file's ID, not its name or folder, so renaming or moving the file later does not change it.

Change the file later

  1. Open the file in the dashboard and choose Replace.
  2. Pick the new version. When it finishes you see "File replaced. Its link is unchanged."
  3. Scan the printed code again to confirm the new version opens.

From a terminal or a script, the CLI does the same:

steadylink replace print:menus/dinner.pdf ./dinner-menu-autumn.pdf

If someone outside your team prepares the new version, such as a designer or a print shop, send them a replacement request. They upload the file, and nothing changes on the live link until you approve it. You can also approve it for a future time, so the new menu goes live when the season changes rather than when you happen to be at a computer.

SteadyLink has two kinds of link for the same file. The stable link, /a/ASSET_ID, serves whatever version is current. A pinned link, such as /a/ASSET_ID?v=3, always serves revision 3 and never changes.

For a QR code you want to update, encode the stable link. If you copy a link that ends in ?v= and print it, the code will keep opening that old version forever, no matter how many times you replace the file. Before generating the code, check that the URL ends in the asset ID with nothing after it.

Pinned links are useful for the opposite case: a code on a certificate or a signed document that should always open exactly the version that was issued.

Expect a short changeover

After a replacement, SteadyLink serves the new version immediately, but the stable link is cacheable for five minutes with a short background refresh after that. A phone or network cache that opened the file a moment ago may show the old version briefly. Anyone scanning for the first time gets the new one.

Right after a replacement the new file is also scanned for malware, which usually takes seconds. During that time the link answers with a "locked" response instead of the old file. For a busy code, like a menu during service, replace the file during a quiet moment or schedule the change through a replacement request.

Practical tips for printed codes

  • Keep the content type consistent. SteadyLink allows replacing a PDF with an image, but if people expect a PDF menu, keep publishing PDFs so phones handle it the same way each time.
  • Keep the file small enough to open quickly on a phone connection. Compress large scans before uploading.
  • Print the code at a size that scans easily, with a clear margin around it.
  • Put a short line of text next to the code saying what it opens, such as "Scan for today's menu".
  • If you print many codes for different files, keep a list of which asset ID each one points at. The dashboard shows each file's link.

If something goes wrong

If you publish the wrong file, open it, go to Version history, and choose Restore on the previous revision. The printed code goes back to opening the older version. The only things that break a stable link are deleting the file or its bucket, or making the file private, so avoid those for any file that is printed somewhere.

The same approach works for any file you share by link. See how to update a PDF without changing the link, how to get a permanent link to a file you can update, and the stable links concept page, which covers caching and pinned revisions in detail. You can sign up for the Free plan to try it with one code.

Questions

Can I change what a QR code opens after printing it?
The code itself cannot change, but what its URL serves can. Encode a SteadyLink stable link in the code, then replace the file behind it whenever it changes.
Which link should I put in the QR code?
The stable link, https://cdn.steadylink.io/a/ASSET_ID, with nothing after the ID. A pinned link ending in ?v= always opens the same old version.
How quickly does a QR code show the new file?
SteadyLink serves the new version immediately. Phones or networks that opened the file in the last few minutes may see the old one briefly, because the stable link is cacheable for five minutes.
What would break a printed QR code?
Deleting the file or its bucket, or switching the file to private. Replacing, renaming, or moving the file keeps the link working.