Using WebForms with Remote Storage
Magento can keep the contents of the media folder on a remote object store instead of the web server's own disk. Amazon S3 and S3-compatible services such as MinIO, DigitalOcean Spaces and Wasabi are supported by Magento itself.
From version 3.6.2, WebForms works on such stores. Everything that touches an uploaded file goes through Magento's media storage:
- files customers attach to a form
- image resizing and thumbnails
- images shown in the gallery field
- attachments on notification and reply emails
- file downloads in the admin and on the storefront
- the file export from the submissions grid
- the scheduled cleanup of old files
There is no setting to switch on in WebForms. Once Magento is configured for remote storage, WebForms follows it.
Requirements
- WebForms Pro 3 3.6.2 or newer.
- If you use the Hyvä theme, the Hyvä compatibility module 2.2.9 or newer. Earlier versions look for the files on the local disk, so previews stay empty on the storefront.
- Magento's own remote storage configuration, set up as described in the Adobe Commerce documentation.
Moving an existing store to remote storage
Files that customers uploaded before the switch stay on the local disk, and they have to be copied into the bucket for old submissions to keep working.
After switching Magento to remote storage, run:
php bin/magento webforms:media:sync
It copies the form files into the bucket Magento is configured to use, so no bucket credentials of your own are needed. Files already there are left alone, so the command is safe to run again, and it prints how many were copied and how many were already present.
On a large store it can run for some time without printing anything and reports only when it has finished. If the storage becomes unreachable while it runs, it stops and says so; run it again once the storage is back and it picks up where it left off.
If you have added or removed files in the bucket yourself, with your own S3 tools rather than through Magento, clear the cache first:
php bin/magento cache:flush
Magento remembers what it last saw in the bucket, and the command trusts that record when it decides which files are already there.
Magento's own command does not cover these files:
php bin/magento remote-storage:sync
It only copies files whose name contains a dot, and WebForms stores each upload under a
generated name with no extension, so it skips the whole webforms folder and still reports
success. Run both: Magento's command for the rest of your media, and the one above for the
form files.
Until the files are copied, submissions made before the switch still show their file names, but the download will not find the file. Nothing is lost in the meantime: the files stay on the server's disk and appear again as soon as the command has run.
Thumbnails
Thumbnails are generated the first time an image is displayed and are then written back to the media storage, so the work happens once and not on every page view.
The Images Cache setting under Stores → Configuration → MageMe → WebForms still applies. With the cache disabled, each view regenerates the thumbnail, which on remote storage means a download and an upload every time. Leave it enabled unless you have a specific reason not to.
Notes
- Uploads are limited by the same settings as before. Remote storage does not change the allowed file types or the size limit.
- The temporary files created while an image is being resized are always written to the
local
var/tmpfolder and removed afterwards, so the server still needs a small amount of free disk space.