CBIIT / nci-ctd2-dashboard-tmpl-helper

NCI CTD^2 Dashboard Template Helper
3 stars 1 forks source link

Export - mime type #6

Open vdancik opened 6 years ago

vdancik commented 6 years ago

The correct row name for mime types is "mime_type" instead of "mime_types".

The mime_type for images should be "image/jpg" or "image/png", depending on the file extension. The mime_type for stories should be "text/html", depending on the file extension.

zhouji2013 commented 6 years ago

references

zhouji2013 commented 6 years ago

For each evidence column, there is only one mime type. However, we do allow multiple observations of file type. That implies that we should enforce the constraint that all the files within that same column (column in the spreadsheet, row on the web UI) should have the same mime type. I need Ken's confirmation concerning this.

zhouji2013 commented 6 years ago

Row name is corrected and the actual mime type is populated; in case of more than one observation, the last evidence file's mime type is recorded (in fact overwriting the earlier ones).

kcs3 commented 6 years ago

The following is observed on testing: A file of type .png receives mime_type image/png. A file of type .jpg receives mime type image/jpeg. A file of type .siff receives no mime type. A file of type .txt is rejected by the submission builder, with message that text files are not allowed to be uploaded. A file of type .html is rejected by the submission builder, with message that text files are not allowed to be uploaded.