FAQ
Answers to the common questions and problems with the Media module, and its current limits.
Uploads fail with a CORS error
The browser uploads straight to the storage, on another origin than the dashboard. Add every origin the dashboard is served on to cors.allowedOrigins of the api module. See Installation.
The upload queue says the storage cannot be reached
The browser cannot reach the storage's baseUrl, for example because it is an internal host name. Point the storage's baseUrl and the module's publicBaseUrl at the public URL of the API.
If the API has no public URL, because the backend is reachable only through the dashboard, point them at the dashboard's public URL instead. With @antelopejs/file-storage-local, the dashboard's frontend server proxies the upload and download URLs (/file-storage/upload/**, /file-storage/files/**) without the member's session. It refuses an upload over 500 MiB with a 413. Raise the body size and the timeouts of any reverse proxy in front of the dashboard to match. See Large transfers.
Copied links open a 404 on the dashboard
The module declares /media/** to the dashboard's frontend server (backendProxies, with the session). A /media/... link on the dashboard's origin then reaches the backend, and a private file opens for a signed-in member. A 404 there means the dashboard runs a Media module or a renderer outside the ranges of the README compatibility table. Copied links still start with publicBaseUrl, the public URL of the API, so they work outside the dashboard. Set it to ${@api.API_PUBLIC_BASE_URL}.
The module fails to load after an upgrade
The README compatibility table and engines["@antelopejs/dms-frontend"] of frontend-vue/package.json set the DMS backend, renderer and media interface releases that Media runs on. Upgrade the project's DMS backend to a release that implements the @antelopejs/interface-dms range of that table, and the renderer to the engines range. Otherwise, keep the Media release that your current DMS backend supports. Troubleshooting covers dependency resolution and frontend integration errors. An upgrade keeps the data, the folders and the /media URLs.
A member cannot see the folder of a field
The folder's rights come from the page that holds the field, and only an explicit grant of that page in the member's role counts. A page that every member opens by default (memberAccess, publicAccess) grants no folder right. Grant the page to the role, or add a permissionMapping to the binding.
A member cannot make a file public
Only the owner can change the visibility of a file or a folder.
A private link asks me to sign in
A private file needs a signed-in member with read access to its folder. A browser without a session goes to the file's page in the dashboard, which signs in and shows the file. When the DMS has no dashboard URL, the browser gets a 401 page instead. Scripts, which do not ask for HTML, get a bare 401.
Current limitations
ImportMediaAssetwrites declared content from the server throughWriteFileofinterface-file-storage. It does not wait for the API server to listen.- The purge of abandoned staged uploads reads the
media_uploadstable, which the module fills atpresign, becauseinterface-file-storageexposes no listing. - Folder visibility applies to the folder's direct files. Subfolders do not inherit it. Each file inherits the visibility of its folder or sets its own.
- Cover cropping is centred, with no focal point. The module does not count references, so the Usage tab of a file says that usage is not tracked.
- The
AssetTypefield has no crop button. Editing an image changes it everywhere it is used, and there is no crop per usage. - There is no way to replace a file, and no trash for deleted files.
AssetTypevalidates the shape of the value: asset ID strings and, in multiple mode, the maximum count. It does not check that those IDs exist, belong to the tenant or match the allowed MIME types. Enforce those checks in the write path that consumes the value. The picker's filter is not an authorization boundary.