Loading

Quipoin Menu

Learn • Practice • Grow

node-js / Basic HTTP Server with File Upload
mcq
Direction: Choose the correct option

Q1.

Which module is essential for handling file uploads in a raw Node.js HTTP server?
A. http
B. path
C. fs
D. os
Direction: Choose the correct option

Q2.

What enctype is used for file uploads in HTML forms?
A. text/plain
B. application/x-www-form-urlencoded
C. application/json
D. multipart/form-data
Direction: Choose the correct option

Q3.

In raw Node.js, how do you handle `multipart/form-data` to parse file uploads?
A. Use a library like `formidable` or `multer`
B. Read the raw stream and parse manually
C. Use `JSON.parse`
D. It's built into `http` module
Direction: Choose the correct option

Q4.

What is a common library for handling file uploads in Node.js?
A. multer
B. busboy
C. formidable
D. All of the above
Direction: Choose the correct option

Q5.

What is a security consideration when allowing file uploads?
A. Scan for malware
B. Limit file size
C. All of the above
D. Validate file type