0

In the app.js I have

app.use(multer({dest:'./uploads'}))

what's './uploads' here? it's the same level with app.js, what's the different between ./uploads with just uploads?

And I also saw some do '_/upload', what's the different with 'upload' then?

4
  • See multer readme: github.com/expressjs/multer Commented Oct 4, 2015 at 12:45
  • See unix.stackexchange.com/questions/125522/path-syntax-rules Commented Oct 4, 2015 at 12:51
  • @MyrneStol that just doesn't mean anything to my question Commented Oct 4, 2015 at 12:55
  • Alice, the readme of multer shows what the meaning of the dest option is. The second shows in-and-outs of file paths on unix systems. Both resources are relevant, but not a direct answer to your question. Hence, I posted the links as comments. Commented Oct 4, 2015 at 16:11

1 Answer 1

1

./ means current directory which is the directory the program is being run from so ./uploads and uploads are basically the same, _/uploads is a directory path with a parent directory i guess named _ and a child directory named uploads.

Sign up to request clarification or add additional context in comments.

2 Comments

uh? if the directory is named _ why not it's /_uploads?
it's the parent directory that is named _ that is why there is / in the name to indicate a path that consists of a parent directory named _ and a child directory named uploads and if you are on unix/linux /_uploads means a directory or file named _uploads in root.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.