Skip to content

Move file asynchronously #4

@imlyc

Description

@imlyc

Hi,

I'm using mongoose-file in my project where I need to upload an image for a user and return the link to the image after the image meta data is stored in the db. I find the setter for "pathname.file" works asynchronously if "upload_to" is set, because "mkdirp" and "rename" are called asynchronousely. As a result, the meta data maybe all null after the assignment. Do you have any good idea to avoid the null meta data? (Meta data is the json object represent the file in the plugin).

Thanks very much and I appreciate your help.

Yuchen

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