You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by michellephung <gi...@git.apache.org> on 2015/08/06 19:15:59 UTC

[GitHub] couchdb-fauxton pull request: Fix doc attachment uploader

GitHub user michellephung opened a pull request:

    https://github.com/apache/couchdb-fauxton/pull/491

    Fix doc attachment uploader

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/michellephung/couchdb-fauxton Fix-uploader

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb-fauxton/pull/491.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #491
    
----
commit 04141abaa82348fdcce5171228bbf4d6b90c948c
Author: Michelle Phung <mi...@apache.org>
Date:   2015-08-06T17:15:43Z

    Fix doc attachment uploader

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Fix doc attachment uploader

Posted by robertkowalski <gi...@git.apache.org>.
Github user robertkowalski commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/491#issuecomment-128670939
  
    travis should (hopefully) work again: https://github.com/apache/couchdb/commit/6286e880ef7a4c336cbe0e5b4b7a9f560c4ae7af
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Fix doc attachment uploader

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/couchdb-fauxton/pull/491


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Fix doc attachment uploader

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/491#issuecomment-128449194
  
    [COUCHDB-2756[(https://issues.apache.org/jira/browse/COUCHDB-2756)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Fix doc attachment uploader

Posted by michellephung <gi...@git.apache.org>.
Github user michellephung commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/491#issuecomment-128523185
  
    I am not sure about the test suite. I think the test suite is red because of the security pr. 
    I will make a test pr without that commit in it, and test that theory (tomorrow). I'll ask Bob to revert if it's the case. 
    
    I think so, re: the jquery.form. I'll take a look if we are using that lib anywhere else when I make the test PR.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Fix doc attachment uploader

Posted by robertkowalski <gi...@git.apache.org>.
Github user robertkowalski commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/491#issuecomment-128521281
  
    does it mean we can delete assets/js/plugins/jquery.form.js now?
    
    testsuite is red


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Fix doc attachment uploader

Posted by garrensmith <gi...@git.apache.org>.
Github user garrensmith commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/491#issuecomment-129365623
  
    @michellephung could you rebase once #494 lands and test this again.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Fix doc attachment uploader

Posted by robertkowalski <gi...@git.apache.org>.
Github user robertkowalski commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/491#issuecomment-130132164
  
    cool i think we can delete the assets/js/plugins/jquery.form.js :)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Fix doc attachment uploader

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on a diff in the pull request:

    https://github.com/apache/couchdb-fauxton/pull/491#discussion_r36493514
  
    --- Diff: app/addons/documents/views-doceditor.js ---
    @@ -50,16 +49,20 @@ function (app, FauxtonAPI, Components, Documents, Databases, prettify) {
     
           this.$('#_rev').val(docRev);
     
    -      $form.ajaxSubmit({
    -        url: this.model.url(),
    -        type: 'POST',
    -        beforeSend: this.beforeSend,
    -        uploadProgress: this.uploadProgress,
    +      $.ajax({
    +        url: this.model.url() + '/' + file.name + '?rev=' + docRev,
    +        xhrFields: {
    +          withCredentials: true
    +        },
    +        type: 'PUT',
    +        data: file,
    +        processData: false,
    +        contentType: file.type,
             success: this.success,
             error: function (resp) {
    -          console.log('ERR on upload', resp);
    -          return that.set_error_msg('Could not upload document: ' + JSON.parse(resp.responseText).reason);
    -        }
    +          this.set_error_msg('Could not upload document: ' + JSON.parse(resp.responseText).reason);
    --- End diff --
    
    I think "Could not upload attachment" would be better message here since actually request uploads an attached file, not document. Otherwise this message creates logically conflict with the error on L43 when you can update document and add attachment at the same time.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---