Windows: Drag & Drop from opened zip file results in 0 B attachments
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 354
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 43
Description
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Describe the bug
I can add files from Windows Explorer to attachments via drag & drop. This also works if I have an open zip file in explorer and drag and drop the files. But the files seem not to be unzipped in the process. Instead, there is now a 0 B attachment that cannot be opened.
To Reproduce
Steps to reproduce the behavior:
- Create a ZIP file with files inside.
- Open the ZIP file in Windows Explorer.
- Drag and drop a file from the ZIP file to the "Upload attachment" area in Nextcloud
- There is no a 0 B attachment that cannot be opened
Expected behavior
Either the file is decompressed and then uploaded correctly, or the drag & drop should not work.
Screenshots



Client details:
- OS: Window 10
- Browser Chrome
- Version 96
- Device: ThinkPad T14
Server details
I don't know most of these because the server is not administered by meOperating system:
Web server: nginx/1.10.3
Database:
PHP version:
Nextcloud version: Nextcloud 20.0.9.1
Where did you install Nextcloud from:
Signing status:
Browser log
attachmentUpload.js:57 100
xhr.js:177 Laden von XHR beendet: POST „https://nextcloud.example.com/index.php/apps/deck/cards/492/attachment“.
(anonym) @ xhr.js:177
t.exports @ xhr.js:13
t.exports @ dispatchRequest.js:50
Promise.then (async)
c.request @ Axios.js:61
(anonym) @ bind.js:9
(anonym) @ AttachmentApi.js:41
c @ runtime.js:45
(anonym) @ runtime.js:274
forEach.e.<computed> @ runtime.js:97
z @ main.js?v=509ae40f:1602
a @ main.js?v=509ae40f:1602
(anonym) @ main.js?v=509ae40f:1602
(anonym) @ main.js?v=509ae40f:1602
(anonym) @ AttachmentApi.js:26
(anonym) @ attachment.js:83
c @ runtime.js:45
(anonym) @ runtime.js:274
forEach.e.<computed> @ runtime.js:97
G @ main.js?v=509ae40f:1602
a @ main.js?v=509ae40f:1602
(anonym) @ main.js?v=509ae40f:1602
(anonym) @ main.js?v=509ae40f:1602
createAttachment @ attachment.js:82
(anonym) @ vuex.esm.js:851
d.dispatch @ vuex.esm.js:516
dispatch @ vuex.esm.js:406
(anonym) @ attachmentUpload.js:52
c @ runtime.js:45
(anonym) @ runtime.js:274
forEach.e.<computed> @ runtime.js:97
Ye @ main.js?v=509ae40f:2161
a @ main.js?v=509ae40f:2161
(anonym) @ main.js?v=509ae40f:2161
(anonym) @ main.js?v=509ae40f:2161
(anonym) @ index.js:157
_tryToStartAnother @ index.js:105
(anonym) @ index.js:171
add @ index.js:152
(anonym) @ attachmentUpload.js:50
c @ runtime.js:45
(anonym) @ runtime.js:274
forEach.e.<computed> @ runtime.js:97
Ye @ main.js?v=509ae40f:2161
a @ main.js?v=509ae40f:2161
(anonym) @ main.js?v=509ae40f:2161
(anonym) @ main.js?v=509ae40f:2161
onLocalAttachmentSelected @ attachmentUpload.js:35
handleDropFiles @ AttachmentDragAndDrop.vue:118
drop @ AttachmentDragAndDrop.vue?be70:1
Rt @ vue.runtime.esm.js:1854
n @ vue.runtime.esm.js:2179
i._wrapper @ vue.runtime.esm.js:6917
22 weitere Frames anzeigen
util.js:130 OC.Util.relativeModifiedDate is deprecated and will be removed in Nextcloud 21. See @nextcloud/moment
relativeModifiedDate @ util.js:130
(anonym) @ init.js:96
each @ jquery.js:365
each @ jquery.js:137
(anonym) @ init.js:95
xhr.js:184 Laden von XHR beendet: GET „https://nextcloud.example.com/ocs/v2.php/apps/notifications/api/v2/notifications“.
(anonym) @ xhr.js:184
e.exports @ xhr.js:13
e.exports @ dispatchRequest.js:50
Promise.then (async)
l.request @ Axios.js:61
r.forEach.l.<computed> @ Axios.js:76
(anonym) @ bind.js:9
(anonym) @ notificationsService.js:64
c @ runtime.js:45
(anonym) @ runtime.js:274
forEach.e.<computed> @ runtime.js:97
D @ notifications-main.js?v=509ae40f:284
i @ notifications-main.js?v=509ae40f:284
(anonym) @ notifications-main.js?v=509ae40f:284
(anonym) @ notifications-main.js?v=509ae40f:284
(anonym) @ notificationsService.js:53
(anonym) @ notificationsService.js:39
c @ runtime.js:45
(anonym) @ runtime.js:274
forEach.e.<computed> @ runtime.js:97
D @ notifications-main.js?v=509ae40f:284
i @ notifications-main.js?v=509ae40f:284
(anonym) @ notifications-main.js?v=509ae40f:284
(anonym) @ notifications-main.js?v=509ae40f:284
(anonym) @ notificationsService.js:26
(anonym) @ App.vue:225
c @ runtime.js:45
(anonym) @ runtime.js:274
forEach.e.<computed> @ runtime.js:97
O @ notifications-main.js?v=509ae40f:303
i @ notifications-main.js?v=509ae40f:303
(anonym) @ notifications-main.js?v=509ae40f:303
(anonym) @ notifications-main.js?v=509ae40f:303
_fetch @ App.vue:224
_backgroundFetch @ App.vue:255
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with AttachmentDragAndDrop.vue and attachmentUpload.js, which appear in the browser stack for the drop and upload flow. Reproduce the issue in Chrome on Windows by dragging a file from an open ZIP, then trace the request through AttachmentApi.js. Done means the file uploads with its contents, or the unsupported drag operation is rejected instead of creating a 0 B attachment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100