Skip to content

Feature: Support custom file path in file.save(fileUploadedPath) when using nestjs-form-data interceptor #63

Description

@shaqqan

Currently, when uploading files using the nestjs-form-data interceptor, there's no built-in way to define a custom path where the file should be saved when calling image.save(). It would be useful to have the ability to specify or override the destination path programmatically during the file handling process.

Suggested Feature:

Add support for defining a custom path for uploaded files, possibly via:

file.save(fileUploadedPath)

Configuration in the interceptor

Middleware hook or callback to dynamically resolve the path

Use case:

When saving files using a class like Image, I would like to be able to call image.save() and have it automatically save to a project-specific or user-specific directory, rather than the default temp directory.

This feature would allow for better file organization and integration into existing file management structures.

Example:

image.file.save('./uploads/images'); // Saves to ./uploads/images

Let me know if you need more details or a PR suggestion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions