NPellet / visualizer

Other
43 stars 24 forks source link

No way to attach SDF file to a view #887

Closed lpatiny closed 8 years ago

lpatiny commented 8 years ago

Trying to upload a SDF (via the view manager button interface) I get the message:

image

Should mimetype determination be a common method in the whole visualizer ? Would be nice to have the mimetypes:

stropitek commented 8 years ago

Cannot reproduce with an sdf using latest release. The upload succeeds with mime type application/octet-stream. There is already a file (src/utils/mimeTypes.js) for custom mime types. Ideally the mime types should be added to mime-db

lpatiny commented 8 years ago

Daniel you could make a pull request with the addition of the proposed format ? The reference would be : https://en.wikipedia.org/wiki/Chemical_file_format

Maybe you could improve mimeTypes.js so that we can add the next extensions / mimetype in the same format as in mime-db as long as they don't add our requests. What do you think ?

stropitek commented 8 years ago

ok will do. The visualizer library uses the same api as the original library, so it will be a simple change if we don't need our library anymore. I don't see the advantage of using the mime-db format for our custom extensions. We only need to make it simple to add them.

stropitek commented 8 years ago

Have you ever considered registering those type to IANA? This would be the best (but not simplest) way to add them to mime-db (iana types are automatically fetched and added there) http://www.iana.org/form/media-types