midasplatform / Midas

Girder https://github.com/girder/girder is a more modern, better supported application than Midas Server. Look at Girder before using Midas Server. Midas Server is an open-source application that enables the rapid creation of tailored, web-enabled data storage
https://web.archive.org/web/20200929102106/www.midasplatform.org/
Apache License 2.0
17 stars 9 forks source link

Problems serving content from Midas: wrong content type for images? #81

Open jcfr opened 9 years ago

jcfr commented 9 years ago

Problem initially reported by @fedorov

Image uploaded to Midas are associated with the "application/octet-stream" whereas image upload a year ago were associated with "image/png", "image/jpeg", .... .

This is causing problem to embed image. See details in forwarded email.

Note that I confirmed this with both png and jpeg after updating slicer.kitware.com to the current master.

Here are the two images discussed in the forwarded email:

Item1: http://slicer.kitware.com/midas3/item/162714 Mime type: application/octet-stream

Item2: http://slicer.kitware.com/midas3/item/122386 Mine type: image/png

Thanks for your help and insights, Jc

fedorov commented 9 years ago

Thanks JC! :+1:

jamiesnape commented 9 years ago

This is fixed in the upcoming release. It relates to the HTML5 upload form.

fedorov commented 9 years ago

Thanks for the update. Two clarification questions:

jamiesnape commented 9 years ago

Will the images need to be re-uploaded to have the right mime type?

MIME type is only detected on upload, so, unfortunately, yes.

What is the estimated date for upgrading this installation with the release that fixes the problem?

My hope is that it will be within the next month.

fedorov commented 9 years ago

Very unfortunate indeed.

I guess we were fortunate not to upload a lot of images to Midas!

cpatrick commented 9 years ago

If the number is small and you're talking about slicer.kitware.com, we can likely make the necessary modification to the database.

jcfr commented 9 years ago

@jamiesnape Since it is not reasonable/feasible to ask every user to re-upload their images ... Instead of re-uploading, was thinking to fix the database by changing the mimetype to image/png, image/jpg, ... for every item having extension png, jpg, ...

jamiesnape commented 9 years ago

That would work fine.

jcfr commented 9 years ago

Great.

@cpatrick @jamiesnape Will you come up with the set og SQL queries on your side ? Or is it something I should be working on ?

cpatrick commented 9 years ago

@jcfr and I will work together on this when the time comes.

fedorov commented 9 years ago

thanks, will sound good - when the time comes ;)

jamiesnape commented 9 years ago

Fix now merged into master. If someone can test it, I will close the issue.

jcfr commented 9 years ago

Thanks Jamie. Do we still need to update the database to change the mime type ?

On Fri, Jan 9, 2015 at 10:41 AM, Jamie Snape notifications@github.com wrote:

Fix now merged into master. If someone can test it, I will close the issue.

— Reply to this email directly or view it on GitHub https://github.com/midasplatform/Midas/issues/81#issuecomment-69350717.

+1 919 869 8849

jamiesnape commented 9 years ago

Yes.

fedorov commented 9 years ago

Thank you! I tested by uploading a new image, and it works as expected.

Would be great if existing images' mime types could be updated without reuploading.

jamiesnape commented 9 years ago

It would and it should not be difficult. If anyone else has more time than me and would like to take it on, it would be very helpful. Otherwise, it will be a week or two before I have a chance to work on it.

jamiesnape commented 9 years ago

Can someone confirm the issue is fixed for newly uploaded images on 3.4.0?

jcfr commented 9 years ago

Hi Jamie,

Thanks for the follow up.

Do you have a link to a 3.4.0 instance that we could test with ?

Jc

On Thu, Apr 2, 2015 at 12:23 PM, Jamie Snape notifications@github.com wrote:

Can someone confirm the issue is fixed for newly uploaded images on 3.4.0?

— Reply to this email directly or view it on GitHub https://github.com/midasplatform/Midas/issues/81#issuecomment-88965185.

+1 919 869 8849

jamiesnape commented 9 years ago

Good question. Let me get back to you on that.

fedorov commented 9 years ago

I believe it is fixed now, an image I added to Midas yesterday renders fine on this wiki page: https://github.com/QIICR/ProjectIssuesAndWiki/wiki/Use-case-%22Retrospective-data-encoding%22