Skip to content
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

Merged
merged 2 commits into from May 25, 2022

Conversation

mdelez
Copy link
Collaborator

@mdelez mdelez commented May 25, 2022

resolves DEV-920

@mdelez mdelez added the enhancement New feature or request label May 25, 2022
@mdelez mdelez self-assigned this May 25, 2022
@@ -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'];
Copy link
Collaborator Author

@mdelez mdelez May 25, 2022

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.
Screen Shot 2022-05-25 at 13 18 36

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Collaborator Author

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.

Copy link
Contributor

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.

@mdelez mdelez marked this pull request as ready for review May 25, 2022 11:32
@mdelez mdelez requested a review from kilchenmann as a code owner May 25, 2022 11:32
Copy link
Contributor

@kilchenmann kilchenmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks 🚀

@mdelez mdelez merged commit 84975d7 into main May 25, 2022
@mdelez mdelez deleted the wip/dev-920-support-text-representations branch May 25, 2022 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants