Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Objective: To build an Express Server that can handle File storage, using Multer, and sending files back to the User with Your Choice of Front

Objective: To build an Express Server that can handle File storage, using Multer, and sending files back to the User with Your Choice of Front End (HTML, Handlebars, Other Technologies)
Description: Using the examples from weeks 3 ~ 6, develop a new express app that:
Allows you to upload one image [completed in the guide]
Allows you to upload multiple images [completed in the guide]
Grab and display a random single image from the server [completed in the guide]
Grad and display multiple random images from the server, allow the user to pick how many items from the server they want to view
Grab all the files in the uploads folder and display them in a gallery
Grab all the files in the uploads folder and display them using pagination in a gallery-pagination file [Starter code in Guide]
Complete the following steps:
1. Create an express app, naming the folder: a2-Student_number
3. Handle the latter half of the guide:
a.fetch-multiple send multiple random files back to the client
b.fetch-all send all image files back to the client
c.gallery showcase all the files on the server.
d.gallery-pagination Showcase all the files using pagination.
4. Install these node modules for the assignment, you may add others for your assignment
a. Multer, express, dotenv
b. Create a .env file and place your PORT into there (8000), otherwise default to 3000 on the server file.
5. Using pagination, modify the gallery you made as a new page and route
a. You may use any outside resource to teach you about pagination. I will provide some links to you as well, or quick start guide
b. Hint: javascript - Node pagination with express - Stack Overflow
c. Make a new route and a new page to showcase the contentFor the initial start of the assignment, lets breakdown what we want to accomplish.
1. Upload single or multiple images [maximum 15 at a time] to our server
2. Using different pages, request images from the server based on the type of request that is being received
a. Showcase 1 random image from the server
b. Showcase multiple images from the server (a selector option)
c. A gallery to showcase all the images from the server
d. A gallery with pages to showcase a set number of images
Lets break this down a bit more:
Web pages we would need to consider:
Index page
o Our initial home page to navigate into other webpages
[Send Data Pages]
o Upload single page
o Upload multiple page
[Fetch Data Pages]
o Random image from server
o Multiple random images from server
o Gallery page
o Gallery page with pagination
What about the routes?
Home page
Catch all unwanted route calls (404, route does not exist)
Upload a single image
Upload multiple images, max of 15
Fetch single random image
Fetch multiple random images
Fetch all for the gallery
Fetching all with pagination chunks

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing

Authors: David Kroenke

11th Edition

0132302675, 9780132302678

More Books

Students also viewed these Databases questions

Question

In bargaining, does it really matter who makes the first offer?

Answered: 1 week ago