Skip to main content
Learn how to generate URLs for accessing files after saving.

URL Generation Overview

Public URL

Public access Permanent link

Signed URL

Time-limited access Enhanced security

Auto Generation

Auto after saveToDisk url, signedUrl properties

Storage Manager

getUrl() getSignedUrl()

UploadedFile URL Properties

url Property (Public URL)

Public URL is automatically generated after calling saveToDisk().
url and signedUrl are only available after calling saveToDisk().

Generating URLs with Storage Manager

getUrl() - Public URL

getSignedUrl() - Signed URL

URL Formats by Storage

Local Storage

Local storage generates Public URL based on app URL.

AWS S3

Google Cloud Storage

Practical Examples

File Download URL

Image URLs by Size

Permission-Based URL Generation

Batch URL Generation

URL Caching

Redis Caching

CDN URL

CloudFront (AWS)

Cloud CDN (GCP)

Presigned Upload URL (Client Direct Upload)

Client Direct Upload

URL Validity Check

Check URL Expiration Time

Cautions

Cautions when generating URLs: 1. Set expiration time for Signed URLs 2. Use Public URLs carefully as they are permanent 3. Consider cache invalidation when using CDN 4. Recommend URL logging for usage tracking 5. Use Signed URLs for sensitive files

Next Steps

File Upload Setup

@upload decorator

UploadedFile Class

File info access

Saving Files

Storage Manager

@api Decorator

API basic usage