achingbrain / achingbrain/mongoose-crate

Custom File Names

Open
#10 12 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
57
Forks
22
PR merge metrics
No merged PRs in 30d

Description

Hey, would you accept a pull request to allow filename processing? In short a way to configure the file name to be used for the storage strategies?

Specifically, I need a way to put the modelName, fieldName, model's ID, & a time stamp into the file name. The first 3 are for organization & the timestamp is for cache busting.

something like:
`/public/attachments/:modelName/:fieldName/:id-:updated_at-:guid.ext`

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the storage strategy implementation and how filenames are currently generated. Trace the attachment configuration and identify how model name, field name, ID, timestamp, and GUID could be supplied. Done means a configurable pattern produces the requested path and filename, with tests covering token expansion.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.