keananf / PhotoShareWebApp

Web-based client and RESTful server built with Jersey and Grizzly
2 stars 0 forks source link

Photo content separated out from meta-data #65

Closed keananf closed 6 years ago

keananf commented 6 years ago

This PR entails the simplest implementation of this requirement, and needs slightly altered still.

Included:

keananf commented 6 years ago

The main things I'm looking for feedback on are the explicit storage of the file extension, as well as the endpoint for retrieving photo contents.

If I remember correctly, @gthedev mentioned having the filename in the url? If this is the case, could this be a suitable endpoint:

Would appreciate feedback on this.

keananf commented 6 years ago

@stuartkumar0630 @gthedev @zlan18 Delete your DB files when this PR lands

gthedev commented 6 years ago

@keananf Yes, if we store the contents in the database (rather than file system), then the endpoint would be suitable. I would suggest dropping the album part since it would be useful to retrieve photo contents without knowing its albumId, something like: GET /photos/{id}.{ext} - I've used id since that's unique whereas photo name can duplicate (presumably)

Or perhaps GET /photos/content/{id}.{ext} or something similar to avoid clashing with the meta data endpoint of GET /photos/{id}?

keananf commented 6 years ago

@gthedev That's perfect. Great idea. I'll change it quickly

keananf commented 6 years ago

@gthedev I ended up going with: GET /photos/content/{id.ext}

keananf commented 6 years ago

@gthedev you're right. I had to change it, so now we have explicit apis for fetching PNGs / JPGs.