Skip to content

Conversation

@MohdImran001
Copy link
Contributor

@MohdImran001 MohdImran001 commented Oct 12, 2020

Fixes #1220

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • is descriptively named and links to an issue number, i.e. Fixes #1220

@welcome
Copy link

welcome bot commented Oct 12, 2020

🎉 Thanks for opening this pull request! Please check out our contributing guidelines if you haven't already.

@catarak
Copy link
Member

catarak commented Oct 13, 2020

Thanks for working on this! I ended up fixing this in a different way, which specifically targets only plaintext files, and matches the styling when uploading other file types. Want to test and let me know that it's good?

@MohdImran001
Copy link
Contributor Author

Hii @catarak, this line of code in the uploader.js file is not working and the progress bar is still visible after a successful upload. I tried changing its width to 0 and display property to 'none but nothing works.

file.previewElement.querySelector('.dz-upload').style.width = '100%';

After experimenting a little bit I found out that this works perfectly in a function passed in the success parameter of dropzone configuration. Please refer to the code below. This works perfectly for all file types.

In createDropzone() method, in FileUploader.js.

success: (file, response) => {
        file.previewElement.classList.remove('dz-error');
        file.previewElement.classList.add('dz-success');
        file.previewElement.querySelector('.dz-progress').style.display = 'none';
}

@catarak catarak merged commit 7f6e95e into processing:develop Oct 14, 2020
@MohdImran001
Copy link
Contributor Author

Hii @catarak, I am participating in Hactoberfest for the first time and It would be great if you could add a hacktoberfest-accepted label on this PR. It would help me to claim a Limited Edition T-Shirt or get a tree planted.

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.

Loading bar does not disappear after uploading file.

2 participants