New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(text-file): add support for text file representations (DEV-920) #751
Conversation
@@ -50,6 +52,7 @@ export class UploadComponent implements OnInit { | |||
supportedAudioTypes = ['audio/mpeg']; | |||
supportedVideoTypes = ['video/mp4']; | |||
supportedArchiveTypes = ['application/zip', 'application/x-tar', 'application/gzip']; | |||
supportedTextTypes = ['application/csv', 'application/xml', 'text/plain', 'text/xml']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we support both application/xml
and text/xml
, the upload component has the unfortunate consequence of listing xml
twice. I could add a workaround in the html like @kilchenmann did for the audio files. I guess this also begs the question why text/csv
is not supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good question. I suggest to have it somehow hardcoded similar to the audio format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should display format, that the user understands. There should be the file extension depending on the mimetype. The question is, what does plain
contain? Nobody will understand the plain
text format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a fair point. Sometimes the MIME types don't really match up with the file extensions. So far they've worked out in our favor but not in this case. I'll hardcode it for now and write a comment. I don't really see a point in creating a converter since we don't use these strings anywhere else to my knowledge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is why I had to hardcode it in the audio upload.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks 🚀
resolves DEV-920