•  
     
    story #10721 upload documents with drag'n drop
Summary
Empty
upload documents with drag'n drop
Empty

See live mockup here: https://s.codepen.io/enalean/debug/XPWvLg

I can drag documents from my local computer inside the browser to upload them.

I can drag and drop multiple elements, I can not drop a hole folder. If user try to upload direcly a folder an error is displayed.

/!\ At this step, only new documents can be created using drag and drop. Updating existing documents (creating a new version) is already done.
Given I am dropping A.txt and a document named A.txt already exists, then an error will be shown / the drop won't be accepted.

To ease development:

  • limits (number of files, max file size) are hard coded
  • When I drop files in an existing folder (inside the table view) => it uploads all the documents in that folder
  • The UI is not yet defined when I drop files in the current folder of the view (for example in the root project folder).

We need to take metadata into account:

  • if the folder has no required metadata, then we use the folder metadata for each dropped file.
  • if the folder has required metadata, a new modal is displayed and lets the user choose metadata for all uploaded files (as a mass change).

Document permissions are the same than the parent folder.

For current user, document is displayed with progress bar, for other users document is displayed in the table view only when it has at least one version completly uploaded (we don't want users to download corrupt files).

Check that uploading file is not displayed in old UI)

After Drop, the page is reloaded to show the new files.

In legacy UI it was possible to have the same document twice, now we forbid to have twice a document with the same name:

  • in REST route it throw an error
  • in UI a message indicate than an other document have the same name (even if its type is different)
  • it is possible to have a folder and a document with the same name

 

Empty
Empty
Status
Empty
Done
Development
  • [ ] Does it involves User Interface? 
  • [ ] Are there any mockups?
  • [ ] Are permissions checked?
  • [ ] Does it need Javascript development?
  • [ ] Does it need a forge upgrade bucket?
  • [ ] Does it need to execute things in system events?
  • [ ] Does it impact project creation (templates)?
  • [ ] Is it exploratory?
Empty
Details
#10721
Manuel Vacelet (vaceletm)
2019-01-31 11:33
2017-10-04 11:36
4239

References
Referencing story #10721

Git commit

tuleap/tuleap/stable

Use the real PSR-15 interfaces instead of the PHP 5.6 compatible ones 1a1b1af7fb
Do not block the user while uploading a new document file 700eae918c
Make sure a file can be added to the document manager via the REST API 8a54c40b84
Highlight drop zone for current folder c53e73bcbe
Display fake item after file drop 7e138b78ab
Fix bad conflict resolution 12bb5d99dd
Upload on file drop with Tus d5d324de41
Do not upload on a readonly folder 516eea9a1c
Prevent user to drop more than n files 34009facbc
Special characters in folder name are encoded in drag message f8122fdf0e
Display the progression of files being uploaded f82af1c8cb
Prevent users to drop files bigger than sys_max_size_upload 0fbda56fa4
Add application/gzip to the list of icons 32579c81f0
Do not create twice the same fake item 2bbc630d6e
The upload of document can be canceled 571046bc2f
Flag uploaded file as created 0d4a9b2b5b
Allow client to abort the upload 93ed4baccd
Progress bar does not progress on Chrome 551953739e
Display "Anonymous user" for anonymous documents d2f3329e32
Icon of file being uploaded is not aligned 2be21aee8d
The tus server should mark a file as finished only when all data has been copied c89687e947
Prevent navigation when there is an upload 061f3fb8ac
Update API REST to reject creation of items with duplicated name 8fa45fa009
Clicking multiple times on abort download remove next items in view 0bd963a324
Display errors in a modal 40779ed0bb
Prevent drag 'n drop on a modal 649be548a3
In new modal, we should forbidd to sumbit item if element with same name already exists 51d48c41dd
Reject dropped files that already exist in the parent cec746ad69
Do not display only once the error modal on drop e0e5285727
Prevent concurrent uploads of the same document by the same user e50bffbb74
Mitigate incoherent states if an issue happend while creating a new file document 8c89827362
Handle POST /docman_items errors on drop 8db7d8bd94
Refactoring: event should provide current folder_id 8e01defb89
Global progress bar should be displayed ASAP 7da83f83b5
Ensure the same semaphore key ID is not reused between tests 9dd4d2d05f
Values should have a type so we know what we talk about c9ef7108b8
Remove feedback alert after creation through modal db5520a135
Notify user when the document is created under the fold b7ad48c802
First pass of glossification d0bdb5dff7
Notification should be fixed, not absolute 7e3c95aa66
Ignore files in errors for global progress bar e4218aeb16
Let user drops empty file 4d4a60663d
We should be able to drop a file with same name than a deleted document 181b7bf1d7
Add expand/collapse folder status to ItemRepresentation a0d98215b3
Expand/collapse information should be stored in item property 79ab01b82c
Drag and drop error should be specific to drag and drop component bcd48724df
Fix typo in french translation 0d265a7e01
Refactoring: move scss rules in their own file e4960b17d1
Misalignment of wiki icon 7cd234867e
I can drop a file on a subfolder 4dcdf4cf9d

Follow-ups

User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
  • Permissions set to