Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Use strongly typed MIME types in Dapps and Signer #2772

Closed
tomusdrw opened this issue Oct 21, 2016 · 4 comments
Closed

Use strongly typed MIME types in Dapps and Signer #2772

tomusdrw opened this issue Oct 21, 2016 · 4 comments
Labels
F6-refactor 📚 Code needs refactoring. M4-core ⛓ Core client code / Rust. P9-somedaymaybe 🌞 Issue might be worth doing eventually. Q2-easy 💃 Can be fixed by copy and pasting from StackOverflow.

Comments

@tomusdrw
Copy link
Collaborator

Currently we use Strings for mime types, we could consider using https://github.com/hyperium/mime.rs

@tomusdrw tomusdrw added F6-refactor 📚 Code needs refactoring. P9-somedaymaybe 🌞 Issue might be worth doing eventually. Q2-easy 💃 Can be fixed by copy and pasting from StackOverflow. M4-core ⛓ Core client code / Rust. labels Oct 21, 2016
@rphmeier
Copy link
Contributor

Made some of this change in #2762, but the JS glue codegen needs to generate File instances with a strongly-typed field instead. You have to use the crate directly instead of the hyper::mime module which re-exports it in order to make use of the mime! macro (which is super useful).

@5chdn
Copy link
Contributor

5chdn commented May 16, 2017

This refactoring labelled issue is inactive since last year.

@paritytech/core-devs Please, confirm within 7 days if this is still realistic to implement some day maybe. If so, please comment below and add an assignee, or close otherwise.

@5chdn 5chdn added this to the 1.10 & ... milestone Oct 5, 2017
@5chdn 5chdn modified the milestones: 1.10, 1.11 & ... Oct 17, 2017
@debris
Copy link
Collaborator

debris commented Dec 29, 2017

is it still relevant? I see that we use mime_guess crate now

@tomusdrw
Copy link
Collaborator Author

We do, but not everywhere. I would close for now or move to long term / easy issues.

@5chdn 5chdn modified the milestones: 1.11 & ..., 1.12 & ... Jan 23, 2018
@5chdn 5chdn modified the milestones: 1.12, 1.13 & ... Mar 1, 2018
@debris debris closed this as completed Mar 20, 2018
@5chdn 5chdn modified the milestones: 1.13 & ..., 1.11 Mar 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
F6-refactor 📚 Code needs refactoring. M4-core ⛓ Core client code / Rust. P9-somedaymaybe 🌞 Issue might be worth doing eventually. Q2-easy 💃 Can be fixed by copy and pasting from StackOverflow.
Projects
None yet
Development

No branches or pull requests

4 participants