This repository has been archived by the owner. It is now read-only.

Problems uploading documents #640

Closed
c0r3dump3d opened this Issue May 3, 2016 · 8 comments

Comments

Projects
None yet
4 participants
@c0r3dump3d

c0r3dump3d commented May 3, 2016

Hi, I have installed in owncloud 9.0.1.3 the document plugin version 0.13.0, when I try to upload a odt file from the app upload menu nothing happen, I can not see the uploaded document and no error log it's reported .... only in the firebug console I see this error message:

TypeError: window.FileList.findFileEl is not a function


var $tr = window.FileList.findFileEl(file.name);

Thank you in advance

@lebardix

This comment has been minimized.

Show comment
Hide comment
@lebardix

lebardix May 6, 2016

same problem

Steps to reproduce

Goto in Documents
Choose Upload ("Téléverser" in french)
a file windows chooser appear
select a .odt file
select Open ("Ouvrir")

Expected behaviour

with release OC 8.0.4 stable action upload the selected file
with release OC 9.0.2 stable action do nothing, no upload file
Actual behaviour

with release OC 9.0.2 stable do nothing, no upload
Server configuration

ownCloud version:
OC 9.0.2 stable
Client configuration

Browser:
Iceweasel 38.8.0
Operating system:
Linux Debian wheezy

Insert your browser log here, this could for example include:
(i have change only domain)

goto https://laperouse.mydomain.tld/index.php/apps/documents/index

a) The javascript console log

GET 
XHR 
https://laperouse.mydomain.tld/ocs/v2.php/apps/notifications/api/v1/notifications [HTTP/1.1 200 OK 325ms]
GET 
XHR 
https://laperouse.mydomain.tld/ocs/v2.php/apps/notifications/api/v1/notifications [HTTP/1.1 200 OK 310ms]
GET 
XHR 
https://laperouse.mydomain.tld/ocs/v2.php/apps/notifications/api/v1/notifications [HTTP/1.1 200 OK 288ms]
L'utilisation de « getAttributeNode() » est obsolète. Utiliser « getAttribute() » à la place. jquery.min.js:156:0
TypeError: window.FileList.findFileEl is not a function file-upload.js:264:12
GET 
XHR 
https://laperouse.mydomain.tld/ocs/v2.php/apps/notifications/api/v1/notifications [HTTP/1.1 200 OK 2704ms]
GET 
XHR 
https://laperouse.mydomain.tld/ocs/v2.php/apps/notifications/api/v1/notifications

b) the JS function

    /**
     * Returns whether the given file is known to be a received shared file
     *
     * @param {Object} file file
     * @return {bool} true if the file is a shared file
     */
    _isReceivedSharedFile: function(file) {
        if (!window.FileList) {
            return false;
        }
        var $tr = window.FileList.findFileEl(file.name);   <--line here
        if (!$tr.length) {
            return false;
        }

        return ($tr.attr('data-mounttype') === 'shared-root' && $tr.attr('data-mime') !== 'httpd/unix-directory');
    },

with same browser connect to OC8.0.4 (one another server), the console JS is with uploaded file OK

GET 
https://webcloud.zaclys.com/apps/documents/js/3rdparty/resources/dojo/resources/blank.gif [HTTP/1.1 200 OK 22ms]
L'utilisation de « getAttributeNode() » est obsolète. Utiliser « getAttribute() » à la place. jquery.min.js:156:0
POST 
XHR 
https://webcloud.zaclys.com/index.php/apps/files/ajax/upload.php [HTTP/1.1 200 OK 2058ms]
GET 
XHR 
https://webcloud.zaclys.com/index.php/apps/documents/ajax/documents/list [HTTP/1.1 200 OK 185ms]
TypeError: FileList.highlightFiles is not a function file-upload.js:447:7
GET 
https://webcloud.zaclys.com/index.php/core/preview.png

lebardix commented May 6, 2016

same problem

Steps to reproduce

Goto in Documents
Choose Upload ("Téléverser" in french)
a file windows chooser appear
select a .odt file
select Open ("Ouvrir")

Expected behaviour

with release OC 8.0.4 stable action upload the selected file
with release OC 9.0.2 stable action do nothing, no upload file
Actual behaviour

with release OC 9.0.2 stable do nothing, no upload
Server configuration

ownCloud version:
OC 9.0.2 stable
Client configuration

Browser:
Iceweasel 38.8.0
Operating system:
Linux Debian wheezy

Insert your browser log here, this could for example include:
(i have change only domain)

goto https://laperouse.mydomain.tld/index.php/apps/documents/index

a) The javascript console log

GET 
XHR 
https://laperouse.mydomain.tld/ocs/v2.php/apps/notifications/api/v1/notifications [HTTP/1.1 200 OK 325ms]
GET 
XHR 
https://laperouse.mydomain.tld/ocs/v2.php/apps/notifications/api/v1/notifications [HTTP/1.1 200 OK 310ms]
GET 
XHR 
https://laperouse.mydomain.tld/ocs/v2.php/apps/notifications/api/v1/notifications [HTTP/1.1 200 OK 288ms]
L'utilisation de « getAttributeNode() » est obsolète. Utiliser « getAttribute() » à la place. jquery.min.js:156:0
TypeError: window.FileList.findFileEl is not a function file-upload.js:264:12
GET 
XHR 
https://laperouse.mydomain.tld/ocs/v2.php/apps/notifications/api/v1/notifications [HTTP/1.1 200 OK 2704ms]
GET 
XHR 
https://laperouse.mydomain.tld/ocs/v2.php/apps/notifications/api/v1/notifications

b) the JS function

    /**
     * Returns whether the given file is known to be a received shared file
     *
     * @param {Object} file file
     * @return {bool} true if the file is a shared file
     */
    _isReceivedSharedFile: function(file) {
        if (!window.FileList) {
            return false;
        }
        var $tr = window.FileList.findFileEl(file.name);   <--line here
        if (!$tr.length) {
            return false;
        }

        return ($tr.attr('data-mounttype') === 'shared-root' && $tr.attr('data-mime') !== 'httpd/unix-directory');
    },

with same browser connect to OC8.0.4 (one another server), the console JS is with uploaded file OK

GET 
https://webcloud.zaclys.com/apps/documents/js/3rdparty/resources/dojo/resources/blank.gif [HTTP/1.1 200 OK 22ms]
L'utilisation de « getAttributeNode() » est obsolète. Utiliser « getAttribute() » à la place. jquery.min.js:156:0
POST 
XHR 
https://webcloud.zaclys.com/index.php/apps/files/ajax/upload.php [HTTP/1.1 200 OK 2058ms]
GET 
XHR 
https://webcloud.zaclys.com/index.php/apps/documents/ajax/documents/list [HTTP/1.1 200 OK 185ms]
TypeError: FileList.highlightFiles is not a function file-upload.js:447:7
GET 
https://webcloud.zaclys.com/index.php/core/preview.png
@filkeith

This comment has been minimized.

Show comment
Hide comment
@filkeith

filkeith May 13, 2016

I've tried to fix that. And now I can upload files. (Haven't tested all scenarios, but simple uploading works).

  1. Open file /owncloud/apps/documents/js/documents.js
  2. Go to 671 line. You'll see there
FileList = FileList || {};

FileList.getCurrentDirectory = function(){
    return $('#dir').val() || '/';
};
  1. Make it looks like this
FileList = FileList || {};

FileList.getCurrentDirectory = function(){
    return $('#dir').val() || '/';
};
FileList.findFileEl = function(fileName){
    return jQuery('li:contains("' + fileName + '")');
};
FileList.findFile = function(fileName){
    return OC.Files.FileInfo(fileName);
};
  1. PROFIT

filkeith commented May 13, 2016

I've tried to fix that. And now I can upload files. (Haven't tested all scenarios, but simple uploading works).

  1. Open file /owncloud/apps/documents/js/documents.js
  2. Go to 671 line. You'll see there
FileList = FileList || {};

FileList.getCurrentDirectory = function(){
    return $('#dir').val() || '/';
};
  1. Make it looks like this
FileList = FileList || {};

FileList.getCurrentDirectory = function(){
    return $('#dir').val() || '/';
};
FileList.findFileEl = function(fileName){
    return jQuery('li:contains("' + fileName + '")');
};
FileList.findFile = function(fileName){
    return OC.Files.FileInfo(fileName);
};
  1. PROFIT
@lebardix

This comment has been minimized.

Show comment
Hide comment
@lebardix

lebardix May 13, 2016

works fine in OC9.0
thanks ;)

lebardix commented May 13, 2016

works fine in OC9.0
thanks ;)

@lebardix

This comment has been minimized.

Show comment
Hide comment
@lebardix

lebardix May 13, 2016

On Thu, 12 May 2016 23:41:42 -0700
filkeith notifications@github.com wrote:

I've tried to fix that. And now I can upload files. (Haven't tested
all scenarios, but simple uploading works). 1) Open file /owncloud/apps/documents/js/documents.js 2) Go to
671 line. You'll see there `FileList = FileList || {};

FileList.getCurrentDirectory = function(){
return $('#dir').val() || '/';
};`
3) Add this

FileList = FileList || {};

FileList.getCurrentDirectory = function(){
  return $('#dir').val() || '/';
};
FileList.findFileEl = function(fileName){
  return jQuery('li:contains("' + fileName + '")');
};
FileList.findFile = function(fileName){
  return OC.Files.FileInfo(fileName);
};
  1. PROFIT

You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#640 (comment)

Hi,

Works fine

thanks

Marc Ferraton

lebardix commented May 13, 2016

On Thu, 12 May 2016 23:41:42 -0700
filkeith notifications@github.com wrote:

I've tried to fix that. And now I can upload files. (Haven't tested
all scenarios, but simple uploading works). 1) Open file /owncloud/apps/documents/js/documents.js 2) Go to
671 line. You'll see there `FileList = FileList || {};

FileList.getCurrentDirectory = function(){
return $('#dir').val() || '/';
};`
3) Add this

FileList = FileList || {};

FileList.getCurrentDirectory = function(){
  return $('#dir').val() || '/';
};
FileList.findFileEl = function(fileName){
  return jQuery('li:contains("' + fileName + '")');
};
FileList.findFile = function(fileName){
  return OC.Files.FileInfo(fileName);
};
  1. PROFIT

You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
#640 (comment)

Hi,

Works fine

thanks

Marc Ferraton

@c0r3dump3d

This comment has been minimized.

Show comment
Hide comment
@c0r3dump3d

c0r3dump3d May 24, 2016

Hi, perfect!! It's working fine in 9.0.2 (stable).

c0r3dump3d commented May 24, 2016

Hi, perfect!! It's working fine in 9.0.2 (stable).

@c0r3dump3d c0r3dump3d closed this May 25, 2016

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Oct 2, 2016

@c0r3dump3d Please re-open if you need to manually modify stuff within the app source code to get a functionality to work

ghost commented Oct 2, 2016

@c0r3dump3d Please re-open if you need to manually modify stuff within the app source code to get a functionality to work

@VicDeo

This comment has been minimized.

Show comment
Hide comment
@VicDeo

VicDeo Oct 3, 2016

Contributor

@RealRancor nope, it's fixed ;) #652

Contributor

VicDeo commented Oct 3, 2016

@RealRancor nope, it's fixed ;) #652

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Oct 3, 2016

Ahh, thanks. Thought this wasn't fixed because of the user reported upload issues in #666 and no reference to a fix in here.

ghost commented Oct 3, 2016

Ahh, thanks. Thought this wasn't fixed because of the user reported upload issues in #666 and no reference to a fix in here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.