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

Add support for pasting data into compose area #84

Merged
merged 4 commits into from
Feb 22, 2017
Merged

Add support for pasting data into compose area #84

merged 4 commits into from
Feb 22, 2017

Conversation

dbrgn
Copy link
Contributor

@dbrgn dbrgn commented Feb 22, 2017

Fixes #82.

@dbrgn dbrgn added the feature New feature! label Feb 22, 2017
@dbrgn dbrgn requested a review from sillych February 22, 2017 14:00
if ((blob as any).name) {
fileName = (blob as any).name;
} else {
const fileExt = blob.type.split(';')[0].split('/')[1];
Copy link
Contributor

Choose a reason for hiding this comment

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

What if type is string does not contain a /?

@dbrgn
Copy link
Contributor Author

dbrgn commented Feb 22, 2017

@sillych better now?

@@ -283,7 +283,7 @@ export default [
let fileName: string;
if ((blob as any).name) {
fileName = (blob as any).name;
} else if (blob.type && blob.type.indexOf('/') !== -1) {
} else if (blob.type && blob.type.match(/^[^;]*\//) !== null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

regex 🎺

@dbrgn dbrgn merged commit 9d68df2 into master Feb 22, 2017
@dbrgn dbrgn deleted the issue-82 branch February 22, 2017 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature!
Development

Successfully merging this pull request may close these issues.

3 participants