Filename templates
Rename files automatically during upload with dynamic tokens.
Add filename_template as a query parameter or JSON body field to rename files on the fly.
POST /api/upload/{connectionId}?filename_template={name}-{date}{ext}
# report.csv → report-2026-03-31.csvAvailable tokens
| Token | Output | Example |
|---|---|---|
| {original} | Full filename | report.csv |
| {name} | Name without extension | report |
| {ext} | Extension with dot | .csv |
| {date} | YYYY-MM-DD | 2026-03-31 |
| {time} | HH-MM-SS | 14-30-00 |
| {datetime} | YYYY-MM-DD_HH-MM-SS | 2026-03-31_14-30-00 |
| {timestamp} | Unix seconds | 1774987800 |
| {uuid} | Random 8 chars | k3x9m2pq |
Examples
invoice-{date}{ext}:data.csv→invoice-2026-03-31.csv{name}_{timestamp}{ext}:report.pdf→report_1774987800.pdfbackup-{datetime}{ext}:db.sql→backup-2026-03-31_14-30-00.sql{name}-{uuid}{ext}:photo.jpg→photo-k3x9m2pq.jpg💡 Tip
If your template doesn't include an extension and the original file had one, PushFTP adds it automatically.