openmindanesth / openmind

anesthetic database
Eclipse Public License 1.0
1 stars 1 forks source link

Store and retrieve uploaded images #10

Closed tgetgood closed 4 years ago

tgetgood commented 5 years ago

We need a place to store images. I think S3 with CORS is the simplest option.

hlesaint commented 5 years ago

Not sure, what it is, but sounds that you have a plan… :) Is it sustainable?

We should think about a good file-size compression prior to storage to minimize data, while preserving image quality.

tgetgood commented 5 years ago

S3 is one of the most cost effective options available. Nothing will be free if we start to have a lot of traffic, but that'll be a good problem to have.

I think we should store the full figure that the author uploads, since many figures contain a great deal of detail that we don't want to compromise by compressing them. In addition to this, we'll need to create a small image to show when someone hovers over the figure link. This will save bandwidth and make the site a lot faster on phones and slow networks.

hlesaint commented 5 years ago

That's great, and the small image display a good idea. Are the original files converted then, for instance to PNG (e.g. if a TIFF is dropped)?

tgetgood commented 5 years ago

We'll have to manage that conversion ourselves. At the beginning I think it's fine to just take whatever images people upload in the original format, so long as browsers can display it. We can go back and reencode the images later on if they start to be too large.

tgetgood commented 5 years ago

I've found an even simpler option, which is to store the images directly in elastic search. It's not the right way to go in the long term, but for now it's working, and it will give us something to show.

I'm going to demote the rest of this issue (doing it the right way) to the beta timeline.

tgetgood commented 4 years ago

Images have been stored in S3 for awhile now. I missed closing this.