Skip to content

Sharing ​

Overview ​

Share links let people outside the workspace open a set of assets, folders or one collage without an account. Every link is a ShareAssetsCategory row (share_assets_category) holding the shared ids as comma separated assets_id / category_id or a collection_id, plus title, description, an optional bcrypt password, hide_download, expiration (the picked calendar date), expires_at (the instant the link stops working), is_active, share_origin, total_visited, generated_source (admin or user) and generated_by.

The link the frontend shows is {workspace name slug}/shared-assets/type={base64 id}&status={base64 kind} where the kind is multiple (assets and folders), collection or single (one asset). For single links type is not a share id: since PR #453 it is a signed SingleShareLink value, base64("<asset id>.<portal id or empty>.<32 hex HMAC>"), so only links the API generated open and a portal link only opens in its own portal. It used to be base64(asset id), so any asset could be opened by guessing ids. The public share pages call unauthenticated endpoints under /api/v1 and /dam/v1.

Links are created from the Admin API (admins) and from the Portal API (partners, generated_source = 'user'). External upload users are a separate feature on the same page: workspace admins invite them by email, they sign in with a one-time code and can upload into the workspace (see Authentication).

Endpoints ​

Admin API (/api/v1, authenticated) ​

MethodPathController@methodPurpose
POST/digital-assets/dashboard/generate-share-assets-urlShareAssetsController@generateShareAssetsURLShare assets and folders
POST/digital-assets/collection/generate-share-urlDamCollectionController@generateShareUrlShare a collage (or a subset of it)
GET/digital-assets/dashboard/list-share-assets-urlShareAssetsController@getShareAssetsListNewList links
POST/digital-assets/dashboard/update-share-urlShareAssetsController@updateShareUrlEdit title, description, password, download, expiry
POST/digital-assets/dashboard/delete-share-assets-urlShareAssetsController@deleteShareURLRevoke or delete links
POST/digital-assets/dashboard/delete-multiple-share-assets-urlShareAssetsController@deleteMultipleShareURLBulk delete
GET/external-user/getExternalUserController@getExternalUserList external users
POST/external-user/add, /external-user/editExternalUserController@addExternalUser, @editExternalUserInvite or update an external user
GET/digital-assets/get-external-uploadedAssetController@getRecentExternalUploadedFilesFiles uploaded by external users

Public (no auth) ​

MethodPathController@methodPurpose
POST/api/v1/show-share-assetsShareAssetsController@showShareAssetsOpen a share link
POST/api/v1/authentication-checkShareAssetsController@checkShareUrlPasswordCheck the link password
POST/api/v1/view-share-files-with-category, /api/v1/get-countShareAssetsController@getSharedCategoryAndFiles, @getCategoryAssetCountBrowse shared folders
POST/api/v1/search-share-dataShareAssetsController@searchShareDataSearch inside the link
POST/api/v1/share-link-viewShareAssetsController@shareLinkViewCount a visit
POST/api/v1/share-zip-dataZipLinkController@generateAdminShareZipDataZip manifest for shared items
POST/api/v1/transaction-activityTransactionActivityController@addShareTransactionActivityEncodeLog share-page activity
GET/dam/v1/show-share-assetsDAM ShareAssetsController@showShareAssetsOpen a partner-made link
POST/dam/v1/view-share-files-with-category, /dam/v1/get-count/{categoryId}, /dam/v1/search-share-dataDAM ShareAssetsControllerBrowse and search a partner-made link
POST/dam/v1/share-zip-dataZipLinkController@generateDealerShareZipDataZip manifest (needs instance_id)
POST/dam/v1/transaction-activityTransactionActivityController@addDealerShareTransactionActivityEncodeLog activity

Portal API (/dam/v1/digital, partner token) ​

MethodPathController@methodPurpose
POST/generate-share-assets-urlDAM ShareAssetsController@generateShareAssetsURLPartner shares assets and folders
POST/collection/generate-share-urlDAM DamCollectionController@generateShareUrlPartner shares a collage
GET/list-share-assets-urlDAM ShareAssetsController@getShareAssetsListPartner's links
POST/delete-share-assets-url, /delete-multiple-share-assets-urlDAM ShareAssetsController@deleteShareURL, @deleteMultipleShareURLRemove links

External upload users (/api/v1, check.external) ​

MethodPathController@methodPurpose
GET/external-brandExternalUserController@externalBrandWorkspace branding for the upload page (public)
GET/check-external-access, /get-external-userExternalUserController@checkExternalAccess, @getLoginExternalUserSession checks
POST/external-uploadExternalUserController@externalUserUploadRegister an uploaded file
POST/submit-requestExternalUserController@externalUserUploadRequestSubmitEmail the inviting admin that uploads are done
POST/upload-zip-previewExternalUserController@uploadZipPreviewStore a client-made preview image as the thumbnail of a ZIP the external user uploaded (see Assets: ZIP preview thumbnail)

Workflows ​

share_origin is taken from the Origin or Referer header. UpdateShareAssetsJob appends the link id to each shared asset's CSV share_id column in chunks of 1000. Collage links (collection/generate-share-url) need id and accept the same options plus an optional assets subset; they also write one digital_assets_downloads row of type share per asset and queue share_assets:update. Partner links from the portal are stored with generated_source = 'user' and send a system notification email.

The same generic message is used for every failure so a visitor cannot tell a revoked link from a wrong domain. The response also carries viewer_timezone (the X-Timezone header when valid, else UTC), and every modified_at in it (assets, folders, and the breadcrumb of view-share-files-with-category) is rewritten as ISO 8601 in that zone, because the column is uncast and would otherwise reach the browser as the server's wall-clock time. With status = single, type must parse as a signed SingleShareLink (else This link is no longer active. It may have expired or been revoked.); the asset (not archived, not deleted) decides the workspace, and one live asset is returned. On the portal (/dam/v1/show-share-assets) the link must also carry a portal id, that portal must be active and the asset must be visible in it (Shared URL is not available. or 404 Assets is not available.).

The password applies to every call of a link, not only the landing call. On the portal, a multiple link without the right access_token returns only the landing header (identity and branding) with password_required: true. The follow-up calls (view-share-files-with-category, get-count/{categoryId}, search-share-data) must name a share that is active, unexpired and unlocked (ShareAssetsCategory::isOpenFor()), else This link is no longer active. It may have expired or been revoked. or Share URL is password protected., and a requested folder must be one of the share's folders or inside one (containsCategory()), else Folder not found.

Creating a link (Admin and portal) now checks that every asset and folder id belongs to the workspace (ShareAssetsCategory::idsBelongToWorkspace()), else 422 Some of the selected assets or folders are not available in this workspace. Paging uses total_record, clamped to 1 to 100 (default 50).

Password check ​

The frontend sends the returned access_token back on show-share-assets, which compares it with the stored hash.

Revoke, delete and expire ​

Deleting an active link only revokes it (Share url revoked successfully.); deleting it again removes it from the list. update-share-url can set or clear the password (password: null or remove_password: true), change hide_download, and set a new expiration (recomputing expires_at) or clear both.

Expiry ​

Changed in ceee95e / a1cf592, from the security audit (backend issue 4 in the migration docblock). Before, expiry compared the date column expiration with the server's "today" in APP_TIMEZONE (Asia/Kolkata), so a link died at 00:00 IST on the chosen date: 12 to 36 hours early for US users.

Now the link stops working at the end of the chosen day in the creator's time zone:

StepRule
1. Pick the zoneresolveViewerTimezone($request, config('app.timezone')): the creator's profile users.timezone, else a valid X-Timezone header, else the app time zone.
2. Compute the instantShareAssetsCategory::expiresAtFor($date, $zone) = Carbon::parse($date, $zone)->endOfDay() converted to config('app.timezone'). An empty date gives null (never expires).
3. Store three columnsShareAssetsCategory::expiryColumns($date, $zone) (8dc1c46d / 05ea1c55) returns expiration (the Y-m-d day as picked), expires_at (the instant) and expires_timezone (the IANA zone it was picked in). All three are null when there is no date. Create (generate-share-assets-url, collection generate-share-url) writes all three.
3b. Updateupdate-share-url normalises expiration to Y-m-d. It re-anchors to the editor's zone only when the date changed or the row has no expires_at yet; an unchanged date keeps the creator's expires_at and expires_timezone, because the edit dialog always sends the stored date back and an editor in another zone would otherwise move (or end) the cutoff. An empty expiration sets all three to null. Extra expires_at / expires_timezone fields in the request body are ignored.
4. Checkis_expired is true when the resolved instant is at or before now(). A row with a date but no expires_at falls back to the end of that date in the app time zone.

Example: a creator in America/New_York picks 2026-11-20. With APP_TIMEZONE=Asia/Kolkata, expires_at = 2026-11-21 10:29:59 (23:59:59 EST). The API serialises it as UTC ISO, 2026-11-21T04:59:59.000000Z.

Where the rule is used:

PlaceScope or check
List links, filter_by=active (admin getShareAssetsList, getShareAssetsListNew)is_active = 1 and notExpired(): expires_at after now, or expires_at null and (expiration null or TIMESTAMP(expiration, '23:59:59') after now)
List links, filter_by=expired (admin and portal lists)expired(): expires_at at or before now, or expires_at null with TIMESTAMP(expiration, '23:59:59') at or before now. The portal list's active filter still checks only is_active.
Open, browse and count (showShareAssets, getCategoryAssetCount) and deleteis_expired accessor
php artisan dam:share-url-expire (daily 12:40)where('is_active', 1)->expired(), then is_active = 0

Migration 2026_11_16_000000_add_expires_at_to_share_assets_category_table adds the nullable expires_at after expiration and backfills existing rows to TIMESTAMP(expiration, '23:59:59'), the end of their date in the app time zone. Existing links therefore now expire at the end of their date instead of its start. Portal-made links do not set an expiration, so they never expire.

Since 8dc1c46d both scopes also treat a date-only row (expires_at null, expiration set) as ending at 23:59:59 of that date in the app time zone, the same fallback as is_expired, so the list filters and dam:share-url-expire agree with the landing page. Before, such a row counted as never expiring in queries.

Migration database/migrations/update/2026_11_17_000000_add_expires_timezone_to_share_assets_category_table.php adds expires_timezone (varchar(64), nullable, after expires_at) and backfills every row with an expires_at, in chunks of 500. For each row it picks the first zone in which the stored instant reads 23:59:59: the creator's users.timezone (admin-made links only, generated_source = 'admin'), then the app time zone, then UTC; if none fits it stores the app time zone. Candidates that are not valid IANA identifiers are skipped.

The model comment says the zone exists so the UI can show the cutoff in the creator's zone to every viewer. Collage Admin currently shows the cutoff in UTC instead ("Nov 17, 2026 10:59 am UTC", see Collage Admin: viewer timezone), and the API never converts expires_at; it is always serialised as UTC ISO.

Since PR #453 share-zip-data (both APIs) runs rejectUnlessInShare() before building anything. In order: share_id is a positive integer naming an active share of this workspace; the share is not expired and hide_download is off; on the portal, the share's instance_id (when set) is the request's portal; a password share gets the password as access_token; assets_ids, category_ids and collection_ids are arrays of positive integers; every folder and Collage id is one of the share's; every asset is shared directly, sits in a shared folder or is in a shared Collage. Any failure returns 403 This link is no longer active. It may have expired or been revoked., except the password (403 Share URL is password protected.). The single-asset shortcut now also filters by workspace and skips archived and deleted assets (No Assets found.). Example body: { "workspace_id": "<slug>", "share_id": 123, "access_token": "<token from authentication-check>", "assets_ids": [456] }. The portal variant additionally requires an existing instance_id.

External upload user ​

External uploads land as uncategorised recent assets, so they are not searchable until an admin files them into a folder. external-user/edit can deactivate a user with is_active; check.external then answers 403 Your account is inactive..

Data ​

Model / tableUse
ShareAssetsCategory / share_assets_categoryShare links. expires_at (datetime cast, stored in the app time zone) decides expiry; expiration (date) is what the date pickers show; expires_timezone is the zone the date was picked in
DigitalAssets.share_idCSV of link ids that include the asset
DigitalAssetsDownloadshare events and downloads from share pages
TransactionActivityShare-page activity
ExternalUser / external_usersExternal upload users