Skip to content

faria86/lab-file-upload

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logo_ironhack_blue 7

Express File Upload

Requirements

Submission

Upon completion, run the following commands

$ git add .
$ git commit -m "done"
$ git push origin master

Navigate to your repo and create a Pull Request -from your master branch to the original repository master branch.

In the Pull request name, add your name and last names separated by a dash "-".

Deliverables

Complete all of the non-bonus iterations. No styling is required, but it is suggested as bonus.

Instructions

Introduction

Instagram is an ultra popular mobile app to share photos.

Iteration 1 | User Profile Pictures

We've already provided a User model and the authentication logic. Unfortunately, the user doesn't have a profile picture.

Fix the User Registration so that it allows the user to upload a file as their profile image.

Iteration 2 | Posts

In this iteration, create the bread and butter of Instagram, the Post.

A post should have the following attributes:

  • content - Text belonging to the post
  • creatorId - ObjectId of the post's creator
  • pictureUrl - Where the picture is stored
  • pictureName - The picture's name

For this iteration you must create the model, along with the new, create, show and index routes. This should include file uploading.

A user should be logged in to create a post, but not to view.

The index will be the home page, and simply display all of the posts on the website.

Iteration 3 | Comments

Posts have comments attached to them. Create the Comment model as a subdocument of the Post. You can read more about subdocuments in the mongoose documentation.

A comment can have images attached to it, but not all do.

The model should have the following attributes:

  • content
  • authorId
  • imageUrl
  • imageName

You should create routes to create new comments. Comments should be displayed on the Post show page.

Happy Coding 💙

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 75.8%
  • HTML 20.7%
  • CSS 3.5%