Skip to content
This repository was archived by the owner on Sep 8, 2021. It is now read-only.

Fixes #118 : Drag and drop multi-uploads#124

Merged
artlowel merged 6 commits intoDSpace-Labs:masterfrom
tdonohue:drag_drop_upload
May 27, 2016
Merged

Fixes #118 : Drag and drop multi-uploads#124
artlowel merged 6 commits intoDSpace-Labs:masterfrom
tdonohue:drag_drop_upload

Conversation

@tdonohue
Copy link
Copy Markdown
Member

This feature uses ng2-file-upload to create a drag and drop file upload experience. ng2-file-upload manages the upload queue and the upload process.

It replaces our existing file upload button with a drag-and-drop 'zone' or button option. Either can be used to select multiple files at one time.

Also provides an upload progress bar when the Item Create form is submitted, letting users know the status of the file uploads.

NOTE: There is a known issue in ng2-file-upload regarding uploading files to our REST API. Unfortunately our REST API doesn't yet support multipart forms, and therefore may corrupt some file formats on upload (especially images). See valor-software/ng2-file-upload#223. I've already submitted a proposed fix to ng2-file-upload: valor-software/ng2-file-upload#224

However, I have discovered this exact same upload issue exists in our current file upload code (which also uses multipart forms with our REST API).

* @param options
* FileUploader options to pass to default FileUploader
*/
constructor(private translate: TranslateService,
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.

TranslateService is not necessary here it seems, or are you planning to use it later?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, actually. Looks like I forgot to take care of the TODO statements lower in this file where I noted that I should be using i18n. That's why TranslateService was added ;) Thanks for the reminder

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Just fixed this in a new commit. TranslateService is now being used to provide i18n to error notifications

@tdonohue tdonohue changed the title Implements #118 : Drag and drop multi-uploads Fixes #118 : Drag and drop multi-uploads May 26, 2016
@artlowel artlowel merged commit 3eea1e5 into DSpace-Labs:master May 27, 2016
@tdonohue tdonohue deleted the drag_drop_upload branch May 27, 2016 13:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants