loopbackio / loopbackio/loopback-next

Storage component

Open
#4,854 3 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
TypeScript
Stars
5.1k
Forks
1.1k
Avg merge
2d 21h
Merged PRs (30d)
27

Description

## Suggestion
Hello i'm writting a new component called Storage under /packages/storage folder and i want to know if you're okay with my implementation.

## Use Cases
For store files, images, videos. providers could be added through extensions thanks to Storage extension point.

## Examples
```ts

// application.ts
import { StorageComponent } from '@loopback/storage'
import { S3Storage } from '@loopback/storage-s3'

export class App extends Application {
constructor(opt: ApplicationConfig = {}) {
super(options);
this.component(StorageComponent)
app.add(createBindingFromClass(S3Storage))
}
}
// controller
import { StorageService } from '@loopback/storage'
import { LOCAL_STORAGE } from '@loopback/storage-local' // could be @loopback/storage-s3 or @loopback/storage-gcs

class UploadController {
constructor(
@service()
public storageService: StorageService,
) {}

async upload() {
// here LOCAL_STORAGE provide a key and type signatures for that provider
await this.storageService.create(LOCAL_STORAGE, {
filename: '/tmp/test.txt',
content: new Buffer(10)
});
}
}```

## Acceptance criteria

TBD - will be filled by the team.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the proposal for the new /packages/storage component and its TypeScript usage examples. The issue does not name implementation files or tests, and its acceptance criteria are still TBD, so the work is not ready to begin until the team defines the provider extension point, supported storage operations, and completion checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.