abstract the plugin to provide support of virtual file system
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript, mongodb
Research direction
No files or tests are named. Start by reading the plugin's current file-serving and Range-header handling, then examine how a generic storage-engine boundary could support the existing filesystem path and the proposed MongoDB GridFS example. Done would require an agreed design that preserves current serving behavior while enabling alternate storage engines.
Written by the indexing model from the issue text.
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the feature has not already been requested
🚀 Feature Proposal
I believe it is a good idea to provide an interface for file serving through different storage engine.
For example,
- File System (which is currently)
- MongoDB GridFS
- S3 compatible interface
Motivation
Manage of Range header is hard and maybe problematic.
Instead, we can provide a generic interface for the user to choose storage engine.
Then, we provide all the others function.
It enables the user to highly customize how to serve file based on their application logic and provide a proper storage engine.
Even file system serving can be customize in this case.
Example
import Fastify from 'fastify'
import FastifyStatic from '@fastify/static'
import FastifyMongoDB from '@fastify/mongodb'
import { MongoDBGridFS } from '@fastify/static/engine'
const fastify = Fastify()
fastify.register(FastifyMongoDB, {
// proper configuration here
// not to demo how to use mongodb
})
fastify.register(FastifyStatic, {
engine: MongoDBGridFS,
db: fastify.mongo.db,
bucketName: 'vfs'
})
// you can serve the file like currently
// but it is backed by other engine
- Dominant language
- JavaScript
- Stars
- 499
- Forks
- 131
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from fastify/fastify-static
-
bug: directory index route root priority is overwritten when wildcard is falsePossibly taken @TalhaHunter101 claimed this 2 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
fastify/fastify-static#617 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
fastify/fastify-static#612 · 1 comment ·
-
10.1.4 regression: path spelling validation calls readdir() on every request, O(n) latency for large directoriesPossibly taken @mcollina claimed this 18 days ago. Open
Difficulty 4/5 3-5 days Newbie friendliness 52/100
fastify/fastify-static#613 ·
-
Use built-in glob from `node:fs`Possibly taken @Ankitraj-sharma claimed this 14 days ago. Opengood first issue
Difficulty 3/5 1-2 days Newbie friendliness 25/100
fastify/fastify-static#551 · 8 comments · 1 reaction ·
-
discussion
Difficulty 5/5 Over a week Newbie friendliness 25/100
fastify/fastify-static#385 · 2 comments ·
All issues in fastify/fastify-static
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
schmayterling/hibi#245 ·
Maintainers usually reply within 1 day
-
factory-active task-identify-harness-labels-done task-identify-issue-type-done
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bug package:vitest
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
cloudflare/workers-sdk#16255 · 1 comment ·
Maintainers usually reply within 1 day
-
Proxy and MCP URLs with an empty authority parse as a different hostPossibly taken @ericcaiwx-star claimed this today. Openclawsweeper:bulk-filed clawsweeper:linked-pr-open clawsweeper:needs-product-decision clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster P2
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
openclaw/openclaw-enterprise#2384 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
Access-request approve silently discards the decider's note (decision_note written only on deny)Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Uuriko/project-room#3378 ·
Maintainers usually reply within 1 day