Skip to content

Add support for images copied from clipboard#486

Closed
lahgolz wants to merge 2 commits intoBoostIO:masterfrom
lahgolz:paste-screenshot
Closed

Add support for images copied from clipboard#486
lahgolz wants to merge 2 commits intoBoostIO:masterfrom
lahgolz:paste-screenshot

Conversation

@lahgolz
Copy link
Copy Markdown
Contributor

@lahgolz lahgolz commented May 23, 2020

Issue #468

Added support for images copied from clipboard (and a system to rename them since all the screenshots have the same name, it can be used later on to rename attachments)

@ZeroX-DG ZeroX-DG added the awaiting review ❇️ Pull request is awaiting a review. label May 26, 2020
Copy link
Copy Markdown
Member

@ZeroX-DG ZeroX-DG left a comment

Choose a reason for hiding this comment

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

Can you change your code please?

Comment thread src/components/atoms/CodeEditor.tsx
Comment thread src/lib/files.ts
for (let i = 0; i < files.length; i++) {
const file = files[i]
const newName = String(file.lastModified)
const newFile = renameFile(file, newName)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We might need to discuss more about file naming here? How should we generate a name for the attachment? @Rokt33r

Copy link
Copy Markdown
Contributor Author

@lahgolz lahgolz May 26, 2020

Choose a reason for hiding this comment

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

Since all the screenshots, at least in Linux, have the same name (image.png in my case), I thought that using the timestamp for the name was a good idea, but yes, it can be rethought.

Comment thread src/components/organisms/NoteDetail/NoteDetail.tsx
@lahgolz
Copy link
Copy Markdown
Contributor Author

lahgolz commented Aug 14, 2020

Since it was added in #583, I close this one.

@lahgolz lahgolz closed this Aug 14, 2020
@lahgolz lahgolz deleted the paste-screenshot branch August 14, 2020 07:20
@Rokt33r
Copy link
Copy Markdown
Member

Rokt33r commented Sep 1, 2020

@EnderDragonneau I'm sorry that I totally forgot about this PR. Thanks for contributing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review ❇️ Pull request is awaiting a review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants