Skip to content

feat: adds drag, drop and pasting of attachments#13136

Merged
GretaD merged 1 commit into
nextcloud:mainfrom
steven-mpawulo:feature/12687-drag-drop-paste-attachments
Jul 16, 2026
Merged

feat: adds drag, drop and pasting of attachments#13136
GretaD merged 1 commit into
nextcloud:mainfrom
steven-mpawulo:feature/12687-drag-drop-paste-attachments

Conversation

@steven-mpawulo

Copy link
Copy Markdown
Collaborator

Add support for attaching files via drag-and-drop and clipboard paste in the message composer.

This reuses the existing attachment upload flow to ensure consistent upload handling and validation.

Fixes #12687.

@ChristophWurst

Copy link
Copy Markdown
Member

Thanks for the feature! Code looks good on a high level. We'll test and review in detail soon.

CI is unhappy about the missing sign-off trailer in your commit.

@ChristophWurst ChristophWurst added the feature:editor All bugs, features and pull requests about the (HTML) editor label Jun 22, 2026
@steven-mpawulo

Copy link
Copy Markdown
Collaborator Author

Thanks
I'll add the missing sign-off trailer and push an updated commit shortly.
@ChristophWurst

@GretaD

GretaD commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

hi @steven-mpawulo, i tested it and i am able to drag and drop some files.
I noticed a couple of problems though:

I cannot drag and drop pdf files.
When i try to add a big file, the popup that my file extends the upload limit is not shown.
Screenshot from 2026-06-22 13-52-32

@steven-mpawulo

Copy link
Copy Markdown
Collaborator Author

Hello @GretaD
Let me look into these issues and resolve them accordingly.

@steven-mpawulo

Copy link
Copy Markdown
Collaborator Author

@GretaD I'm a bit lost here.

If attachment-size-limit is not set, the default value is 0, which means the popup never appears.
How does the admin currently enforce file size limits?
Should we change the default value to something more reasonable?

Screenshot 2026-06-22 at 4 41 45 PM

@GretaD

GretaD commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

@GretaD I'm a bit lost here.

If attachment-size-limit is not set, the default value is 0, which means the popup never appears. How does the admin currently enforce file size limits? Should we change the default value to something more reasonable?

Screenshot 2026-06-22 at 4 41 45 PM

on main we show this warning: https://github.com/nextcloud/mail/blob/main/src/components/ComposerAttachments.vue#L410

can you show the same for drag and drop?

@steven-mpawulo

Copy link
Copy Markdown
Collaborator Author

@GretaD I'm a bit lost here.
If attachment-size-limit is not set, the default value is 0, which means the popup never appears. How does the admin currently enforce file size limits? Should we change the default value to something more reasonable?
Screenshot 2026-06-22 at 4 41 45 PM

on main we show this warning: https://github.com/nextcloud/mail/blob/main/src/components/ComposerAttachments.vue#L410

can you show the same for drag and drop?

Am reusing the already existing logic for uploading files.
Let me investigate more and find the root cause.

@steven-mpawulo

Copy link
Copy Markdown
Collaborator Author

I have managed to set my upload file size limit to 2mbs and tried dragging or pasting a very large pdf file and the pop up appeared.
Screenshot 2026-06-26 at 7 28 29 PM

@GretaD GretaD left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

please fix the lint and sign the commit :)

@steven-mpawulo

Copy link
Copy Markdown
Collaborator Author

please fix the lint and sign the commit :)

Let me work on it asap.

@GretaD

GretaD commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

hi, i could reproduce the same issues on main, which means that was not your pr but my local env. I am approving the PR :) thanks again

@steven-mpawulo
steven-mpawulo force-pushed the feature/12687-drag-drop-paste-attachments branch 2 times, most recently from 18e3177 to ad20a7f Compare July 6, 2026 17:16
@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown

Hello there,
Thank you so much for taking the time and effort to create a pull request to our Nextcloud project.

We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process.

Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6

Thank you for contributing to Nextcloud and we hope to hear from you soon!

(If you believe you should not receive this message, you can add yourself to the blocklist.)

@ChristophWurst

Copy link
Copy Markdown
Member

@steven-mpawulo please squash the two commits into one and look into the failing DCO

then we can merge :shipit:

Add support for attaching files via drag-and-drop and clipboard
paste in the message composer

Signed-off-by: steven-mpawulo <stevenmpawulo@gmail.com>
@steven-mpawulo
steven-mpawulo force-pushed the feature/12687-drag-drop-paste-attachments branch from ad20a7f to 16d4a09 Compare July 16, 2026 07:36
@GretaD
GretaD merged commit 0559e32 into nextcloud:main Jul 16, 2026
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release enhancement feature:editor All bugs, features and pull requests about the (HTML) editor feedback-requested

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The ability to drag and drop attachments from a folder into an email

3 participants