Skip to content

Latest commit

 

History

History
54 lines (40 loc) · 1.94 KB

File metadata and controls

54 lines (40 loc) · 1.94 KB

Springboot Photo Api

Steps to Follow to Test API:

  • Download file in target folder
  • Place in folder somewhere on system
  • run cdm with admin rights
  • Enter following command: java -jar photoz-clone-0.0.1-SNAPSHOT.jar

If Errors occur.

This should ensure app to start.

Description of pages in App

if http://localhost:8080/photoz gives error page

Run following SQL ,IF PHOTOZ Table already EXISTS:

DROP TABLE PHOTOZ
CREATE TABLE IF NOT EXISTS PHOTOZ (
    id INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
    file_name VARCHAR(255),
    content_type VARCHAR(255),
    data binary large object
);

Otherwise just run the Create Table query

Steps to follow

  1. Refresh http://localhost:8080/photoz should be empty brackets on screen
  2. Go to http://localhost:8080/upload.html
  3. Upload a image file (Preferably jpg/png)
  4. Go to http://localhost:8080/photoz see if brackets contain file data - copy id of file
  5. Go to http://localhost:8080/download/id insert copied id inplace of id *example URL -> http://localhost:8080/download/1
  6. Image should display