Architecture Advice: QR code generation

Hello,

I am designing a workflow in Foundry and want to validate if my proposed architecture is possible, along with any best practices you might recommend. I am relatively new to Foundry.

Open workshop > Upload PDF file > Generate QR > Save to Media set > then Display to workshop (QR) > scan the QR using mobile phone > download/display pdf file

How to solve it:

  1. Upload PDF → Action with a media reference property, triggered by a Button group/Media Uploader widget.
  2. Generate QR → no ready-made widget. Need a Function (lib like qrcode in Python or JS) that takes a link and returns the image (SVG/base64).
  3. Save to media set → only needed if you’ll reuse the QR image later. Otherwise, generate it on-the-fly via a function-backed property and skip this step.
  4. Display in Workshop → Image widget (or Markdown widget if it comes as a data URI).
  5. Scan → this is where everything changes depending on who scans it:

If internal user (logged in): the QR encodes a direct link to the Workshop module/object. Scanning it opens Workshop, authenticates via SSO, downloads the PDF. Simple, stays inside Foundry’s security perimeter.

If external user (no account): there’s no native public link for media sets. You’d need either:

  • A public/unauthenticated Workshop app (if your environment has this enabled — confirm with your admin), or
  • A function that generates a temporary signed URL to external storage, with the QR encoding that URL.

Felipe Montes
Development Advisor
Follow me @ linkedin.com/in/felipemontesl/ or GitHub: Brazillianerd