Skip to content
This repository has been archived by the owner on Nov 20, 2018. It is now read-only.

Allow upload with empty file #1710

Merged
merged 5 commits into from
Jan 6, 2017

Conversation

adrianchung
Copy link
Contributor

Brief description of the changes [REQUIRED]

Implement issue #903 . Allow uploading of 0 byte files. Enhancement on pull request #1673

What browsers and operating systems have you tested these changes on? [REQUIRED]

Chrome 55.0.2883.95 (64-bit) on OSX 10.11.6

Are all automated tests passing? [REQUIRED]

yes

Is this pull request against develop or some other non-master branch? [REQUIRED]

yes

@CLAassistant
Copy link

CLAassistant commented Jan 5, 2017

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ adrianchung
❌ Adrian Chung


Adrian Chung seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.

Copy link
Member

@rnicholus rnicholus left a comment

Choose a reason for hiding this comment

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

Looks good, other than my one question. Also, could you write some unit tests that exercise allowEmpty: true?

@@ -326,7 +326,7 @@

this._templating.updateProgress(id, loaded, total);

if (Math.round(loaded / total * 100) === 100) {
if (total === 0 || Math.round(loaded / total * 100) === 100) {

This comment was marked as spam.

This comment was marked as spam.

@achung-miovision
Copy link

Unit tests have been added. I'm not sure what the CLA is for as I'm split between two github accounts right now and I've signed it on both. If it's a problem I can dig further to see what's happening there.

var validationDescriptor = { size: 0 };

fineuploader._validateFileOrBlobData({}, validationDescriptor)
.then(function() { assert.fail(); }, function() {});

This comment was marked as spam.

var validationDescriptor = { size: 0 };

fineuploader._validateFileOrBlobData({}, validationDescriptor)
.then(function() { assert.fail(); }, function() {});
.done(function() { assert.equal(-1, result); });

This comment was marked as spam.

This comment was marked as spam.

var validationDescriptor = { size: 0 };

fineuploader._validateFileOrBlobData({}, validationDescriptor)
.done(function() { assert.equal(-1, result); });

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@rnicholus
Copy link
Member

I'll just run a few quick manual tests sometime in the next few days or so. If all looks good, I'll release this as 5.12.0. Thanks for your work on this!

@rnicholus rnicholus added this to the 5.12.0 milestone Jan 5, 2017
@rnicholus rnicholus changed the title Issue #1: Allow upload with empty file Allow upload with empty file Jan 6, 2017
@rnicholus rnicholus merged commit a12cd73 into FineUploader:develop Jan 6, 2017
@rnicholus
Copy link
Member

This has been merged into develop. I hope to release v5.12.0 this weekend. Thanks again!

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.

4 participants