Description
ScanUpload adds a QR-code upload widget to any page with a shortcode. A visitor scans the QR code with their phone, uploads files, and those files are automatically imported into your WordPress site.
How it works
- You add the
[scanupload]shortcode to any page or post. - The page renders a live QR code.
- A visitor scans it with their phone and uploads files using the ScanUpload mobile flow.
- Files arrive in your WordPress site automatically (Media Library or a sub-folder, your choice).
The plugin is powered by the ScanUpload service, which requires a free ScanUpload account, Client ID and Client Secret.
Features
- Configurable Client ID and Client Secret, stored securely in the WordPress options table.
- Choose where uploads land: Media Library (unattached), Media Library attached to a post/page, or a dedicated uploads sub-folder.
- Live file preview while the visitor uploads.
- Fully automatic import – no button clicks required.
- Works on any theme via the
[scanupload]shortcode.
Getting started
- Create a free account at app.scanupload.net and copy your Client ID and Client Secret from Dashboard Settings Client Credentials.
- In WordPress, open Settings ScanUpload, paste both values and click Save Settings.
- In the ScanUpload Dashboard, add your site address to Allowed Origins (for example
https://example.com). While developing onlocalhost, enable Test Mode instead. - Add the
[scanupload]shortcode to the page where you want the widget (see below).
That is the whole configuration. Until credentials are saved, the widget shows a friendly “ScanUpload is not configured” message instead of a QR code.
Putting the widget on a page
Block Editor (nothing extra to install): edit the page, click +, search for Shortcode, add the block and paste [scanupload] into it.
Elementor: drag the Shortcode widget into the page and paste [scanupload] into its Shortcode field.
Any other theme or builder that renders shortcodes: paste [scanupload] where the widget should appear.
A visitor then points their phone camera at the code, chooses the files they want to send, and the files arrive on your site automatically. The widget lists each file as it arrives, so the visitor can see the upload working.
Where do the files go?
- Media Library, unattached (
import_mode="media", the default) – files appear under Media Library. - Media Library, attached to a post or page (
import_mode="media_attach") – files appear in the library, attached to the post or page you choose. - A sub-folder of the uploads directory (
import_mode="folder") – files are saved underwp-content/uploads/<sub-folder>/and are not added to the Media Library.
In folder mode the plugin also writes .htaccess, index.html and web.config guard files into that folder so uploaded files cannot be executed.
Shortcode
[scanupload]
Optional attributes:
header– Header text shown above the QR code. Default: “Upload files from your phone”.show_header–1or0. Default1.size–small,medium,largeorxlarge. Defaultlarge.file_preview_mode–listorgrid. Defaultlist.import_mode–media,media_attachorfolder. Overrides the site-wide setting for this widget.attach_to– Post ID to attach imported media to whenimport_mode="media_attach". Useattach_to="current"to attach to the post currently being viewed.class– Extra CSS class for the widget container.
Example:
[scanupload header="Scan to send us files" size="large" import_mode="media_attach" attach_to="42"]
When a logged-in visitor uploads files, the imported attachments are attributed
to that user. Anonymous visitors upload unattributed (author 0).
Media is only attached to a post the uploader is allowed to edit; otherwise it
is imported unattached. Use the scanupload_allow_attach_to_post filter to
allow guest submissions to a fixed public post.
Developer Hooks
scanupload_import_author_id– author ID assigned to imported attachments (default: the current user,0for anonymous visitors).scanupload_allow_attach_to_post– whether imported media may be attached to a post (default: only when the uploader can edit it). Use it to allow guest submissions to a fixed public post.scanupload_import_rate_limit– maximum import requests per rate-limit window (default10).scanupload_import_rate_window– rate-limit window in seconds (default600, i.e. 10 minutes).scanupload_import_client_ip– client IP used for rate limiting (default: the direct peer address). Useful behind a trusted reverse proxy.
External services and data
This plugin is a bridge to the ScanUpload service and only connects to it when you configure it and a visitor uses the widget:
- The visitor’s browser creates a scan upload session with ScanUpload (
https://hub.scanupload.net) when a[scanupload]widget is shown. The browser sends only the configured Client ID and your site’s origin. - Your server requests an access token from the ScanUpload identity service (
https://identity.scanupload.net) using the Client ID and Client Secret you entered. - Your server downloads the uploaded files for a session and imports them into your own WordPress site.
No tracking or analytics data is collected or sent by this plugin. Uploaded files are transmitted to and from the ScanUpload service solely to operate the upload feature, and are then stored on your site. No data is shared with any third party. See the ScanUpload Terms and Conditions for how ScanUpload handles the files it processes.
By installing, configuring and using the plugin you consent to the connections described above.
Credits
This plugin bundles the following open-source libraries. Both are included as
readable, unminified source so the shipped code can be reviewed as-is:
- @microsoft/signalr – MIT License. Used for the live file preview.
- qrcode-generator – MIT License. Used to render the QR code.
Both licences are GPL-compatible. The plugin’s own code is licensed under
GPL-2.0-or-later; see license.txt.
Screenshots




![Add [scanupload] to a page with the Shortcode block.](https://ps.w.org/scanupload/assets/screenshot-5.png?rev=3692051)
[scanupload] to a page with the Shortcode block.

Installation
- In your WordPress admin, go to Plugins Add New, search for ScanUpload, then click Install Now. Alternatively, upload the plugin ZIP under Plugins Add New Upload Plugin.
- Click Activate.
- Continue with Getting started above: save your Client ID and Client Secret, allow your site origin, then add the
[scanupload]shortcode to a page.
Requirements: WordPress 6.0+, PHP 7.4+, a free ScanUpload account, and HTTPS. The widget opens a secure WebSocket to the ScanUpload hub, so an HTTP page is blocked by the browser’s mixed-content protection.
FAQ
-
Do I need a ScanUpload account?
-
Yes. Create a free account at app.scanupload.net, then generate a Client ID and Client Secret from the Dashboard.
-
Is my Client Secret exposed to visitors?
-
No. The Client Secret is used only on your server to download uploaded files. It is never printed in the page source.
-
Why do I get an “origin not allowed” error?
-
ScanUpload validates the browser origin that creates a session. Add your exact site origin (for example
https://example.com) to Allowed Origins in the ScanUpload Dashboard. Origins are scheme, host and port specific. -
Can I test on localhost?
-
Yes. Enable Test Mode in the ScanUpload Dashboard to bypass origin validation for local development, and disable it before going live.
-
Where are the files stored?
-
By default they are imported into the WordPress Media Library. You can change this under Settings ScanUpload to attach them to a post/page or save them in a sub-folder of the uploads directory.
-
Does my site need to be HTTPS?
-
Yes. The widget connects to the ScanUpload hub over a secure WebSocket (
wss://), so your site must be served over HTTPS. An HTTP page is blocked by the browser’s mixed-content protection. -
What if my site has a Content Security Policy (CSP)?
-
Allow the hub for both protocols in your
connect-srcdirective:connect-src 'self' https://hub.scanupload.net wss://hub.scanupload.net; https:// permits the session request and `wss://` permits the live SignalR updates. CSP does not infer one from the other. -
Where can I get help?
-
Email support@scanupload.net or see the ScanUpload integration guide.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“ScanUpload” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “ScanUpload” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.0.1
- Replaced direct filesystem calls with WordPress APIs (
wp_delete_file()andWP_Filesystem), removed the redundantload_plugin_textdomain()call, and added translator comments for placeholder strings. No behaviour changes.
1.0.0
- Initial release: settings page,
[scanupload]shortcode, live QR widget, SignalR file preview, and automatic import into the Media Library or uploads sub-folder.
