img1
img2

This project is not covered by Drupal’s security advisory policy.

The photo is on your phone. The form is on your computer. Upload from Phone lets you send the file straight from your phone into the form, without emailing it to yourself.

How it works

  1. On the form, click Upload from phone. A QR code appears.
  2. Scan the QR code with your phone's camera.
  3. Pick a file or take a photo on your phone.
  4. A few seconds later, the file appears in the form on your computer. Save the form as usual.

The page does not reload, so anything else you typed in the form stays.

Works with

  • File and image fields on any form: content, media, users and more.
  • The Media Library, with the included Upload from Phone: Media Library module.
  • Webform file, document, image, audio and video elements, with the included Upload from Phone: Webform module. You turn it on for each element.
  • Visitors who are not logged in, if they are allowed to use the form.
  • Browsers without JavaScript, through a fallback button.

Simple and safe

  • No app on the phone, and nothing is sent to an outside service. The QR code is made by your own site.
  • Uses Drupal core's own file uploads. The field's rules still apply: allowed file types, maximum size, image size and number of files.
  • Each QR code works only once and expires within minutes (5 by default).
  • Only the person who asked for the QR code, in the same browser, can take the file into the form. The phone link gives no access to anything else.
  • Limits stop people from making too many codes or upload attempts.
  • Links use HTTPS by default, and the status report warns you if something is set up unsafely.

Requirements

  • Drupal 10.3 or later, Drupal 11 or Drupal 12.
  • PHP 8.2 or later.
  • HTTPS, and a site address that phones can reach.
  • For Webform: Webform 6.2 or later. On Drupal 12, this waits for a Webform release that supports Drupal 12.

Getting started

  1. Install the module: composer require drupal/upload_from_phone, then enable it.
  2. On a content type's Manage form display, set a file field to File, with upload from phone or an image field to Image, with upload from phone.
  3. At People → Permissions, give the roles that should see the button the Upload files from another device permission.

The README has full setup steps, security notes and troubleshooting.

Not supported yet

DropzoneJS, Entity Browser and Image Widget Crop widgets. Issues and patches are welcome.

Project information

Releases