Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: How to get user's upload directory name in the upload event handler? #50

Open
AleksMeshkov opened this issue Apr 14, 2014 · 0 comments

Comments

@AleksMeshkov
Copy link

Hi! Could you look through the issue below please?

app.use('/upload', function (req, res, next) {
            // imageVersions are taken from upload.configure()
            upload.fileHandler({
                uploadDir: function () {
                    return __dirname + '/public/uploads/' + req.sessionID
                },
                uploadUrl: function () {
                    return '/uploads/' + req.sessionID
                }
            })(req, res, next);
        });
upload.on('end', function (fileInfo) {
   // I want to get __dirname + '/public/uploads/' + req.sessionID here without regexp- parsing fileInfo.url variable
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant