Answered step by step
Verified Expert Solution
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 ~ 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 gallerypagination file Starter code in Guide
Complete the following steps:
Create an express app, naming the folder: aStudentnumber
Handle the latter half of the guide:
afetchmultiple send multiple random files back to the client
bfetchall send all image files back to the client
cgallery showcase all the files on the server.
dgallerypagination Showcase all the files using pagination.
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 otherwise default to on the server file.
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.
Upload single or multiple images maximum at a time to our server
Using different pages, request images from the server based on the type of request that is being received
a Showcase 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 route does not exist
Upload a single image
Upload multiple images, max of
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started