Skip to content

Conversation

@abdollahShahid
Copy link

Summary:
This PR clarifies that uploading folders/directories is not supported and improves UX by showing a warning when a user drops a folder into the upload area.

Changes:

  • Docs: Added a note in docs/inputs.rst explaining that directories are not supported and archives should be uploaded instead.
  • UI: Detect dropped directories in add-inputs.js and display a warning message suggesting uploading a .zip or .tar.gz.

Why:
Dragging and dropping a folder currently appears to hang or does nothing, which is confusing. This provides immediate feedback and points users to the supported approach.

How tested:

  • Manual review of the drop handler logic.
  • Verified that normal file upload behavior remains unchanged.

Fixes #573

Copilot AI review requested due to automatic review settings December 31, 2025 07:08
@abdollahShahid abdollahShahid force-pushed the fix-folder-upload-message branch from 918a270 to 6a93b00 Compare December 31, 2025 07:10
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the user experience around folder uploads by adding a client-side warning when folders are dropped into the upload area and documenting that folders are not supported.

  • Added folder detection in the drag-and-drop handler with a warning notification
  • Updated documentation to explicitly state that folders/directories cannot be uploaded
  • Applied code formatting improvements (arrow functions, consistent quotes)

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
scancodeio/static/add-inputs.js Detects dropped folders using the File System API and displays a warning message; includes code formatting improvements
docs/inputs.rst Adds a note explaining that folders are not supported and users should upload archives instead

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

abdollahShahid and others added 4 commits December 31, 2025 12:21
Signed-off-by: Muhammad Abdullah Shahid <108458621+abdollahShahid@users.noreply.github.com>
Signed-off-by: Muhammad Abdullah Shahid <108458621+abdollahShahid@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Muhammad Abdullah Shahid <108458621+abdollahShahid@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Muhammad Abdullah Shahid <108458621+abdollahShahid@users.noreply.github.com>
@abdollahShahid abdollahShahid force-pushed the fix-folder-upload-message branch from 4f057c9 to 1433bff Compare December 31, 2025 07:22
@abdollahShahid
Copy link
Author

All commits are signed-off (DCO ✅). Waiting for workflow approvals / CI to complete. Thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update docs and show message that uploading folders isn't supported

1 participant