Giter VIP home page Giter VIP logo

31-image-uploads's Introduction

cf Lab 31 - Image Uploads

To Submit this Assignment

  • work on a new branch from your previous fork
  • push to your repository
  • submit a pull request to this repository
  • submit a link to your PR in canvas
  • write a question and observation on canvas

Include

  • .eslintrc
  • .babelrc
  • .gitignore
  • package.json
    • hint: do not forget to add the ng-file-upload module
    • create an npm build script for running webpack
    • create an npm build-watch script for running webpack-dev-server --inline --hot
    • create an npm test script for running karma and all associated tests
    • create an npm test-watch script for running karma on file system changes
    • create an npm lint script for linting your JS with eslint
  • ignore the build directory
  • webpack.config.js
    • this should include all of the production environment configurations used in lecture code
  • karma.config.js

Clone

  • Clone, setup, and run the slugram-backend application in order for your angular app to communicate with the server
  • slugram-backend
    • note - this application should be running on the staging branch
    • note - DO NOT include this application with your assignment submission

Description

  • Today you will add the ability to upload images in your app
  • Create a component for uploading an image to the slugram-backend API for a specific gallery
  • On a successful upload, the pic should be added to the galleries array of pics
  • Create a component for displaying a thumbnail for a particular pic
    • this should include a button that will trigger a DELETE request to the slugram-backend API and delete the photo from the gallery
  • Create a component for displaying the thumbnails for photos in a gallery

Stretch

  • Add the ability to select a gallery and have it's pictures displayed using the thumbnail component

POST /api/gallery

  • Use this route to create a gallery
  • headers required
    • Authorization : Bearer <token>
    • Accept : application/json
    • Content-Type : application/json
  • body requirements
    • name: String
    • desc: String
  • this should return a 200 response and an object with the data for the gallery that was just created

GET /api/gallery

  • use this route to get an array of all of a users galleries
  • headers required
    • Authorization : Bearer <token>
    • Accept : application/json
  • this should return a 200 response and an array of the last 50 galleries created by the user

PUT /api/gallery/<galleryID>

  • use this route to update a gallery with new information
  • headers required
    • Authorization : Bearer <token>
    • Accept : application/json
    • Content-Type : application/json
  • this should return a 200 response and an object with the data for the gallery that was just updated

DELETE /api/gallery/<galleryID>

  • use this route to delete a gallery
  • headers required
    • Authorization : Bearer <token>
  • this should return a 204 response with no content

POST /api/gallery/<galleryID>/pic

  • use this route to create a pic associated with a gallery
  • headers required
    • Authorization : Bearer <token>
    • Accept : application/json
  • body requirements
    • name: String
    • desc: String
  • file: multipart file data
  • this should return a 200 response and an object with the data for the pic that was just created

DELETE /api/gallery/<galleryID>/pic/<picID>

  • use this route to delete a pic
  • headers required
    • Authorization : Bearer <token>
  • this should return a 204 response and no content

31-image-uploads's People

Contributors

cameronmbacon avatar sjschmidt44 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.