File upload through browser fails for larger files

Steps to reproduce

  1. Fresh install of 10.4, install completed successfully
  2. log in through browser try to upload file (+ sign or drag and drop)
  3. progress bar reports 100% compete, verifying…
  4. No files are on the server.

Expected behaviour

The file should be on the server

Actual behaviour

Nothing

Server configuration

Operating system:
I’m using bluehost Linux shared hosting, this is as much info as I can find:
Linux 4.14.94-164.ELK.el7.x86_64 GNU/Linux

Web server:
Apache 2.4.39

Database:
MySQL 5.7.23-23

PHP version:
7.2.24

ownCloud version: (see ownCloud admin page)
10.4.0.4

Updated from an older ownCloud or fresh install:
Fresh install

Where did you install ownCloud from:
wget

Signing status (ownCloud 9.0 and above):
md5 ok
No errors have been found.

The content of config/config.php:

<?php
$CONFIG = array (
  'instanceid' => '*****',
  'passwordsalt' => '*****',
  'secret' => '*****',
  'trusted_domains' =>
  array (
    0 => '*****',
  ),
  'datadirectory' => '/public_html/owncloud/data',
  'overwrite.cli.url' => 'http://*****',
  'dbtype' => 'mysql',
  'version' => '10.4.0.4',
  'dbname' => '*****',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '*****',
  'dbpassword' => '*****',
  'logtimezone' => 'UTC',
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/public_html/owncloud/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/public_html/owncloud/apps-external',
      'url' => '/apps-external',
      'writable' => true,
    ),
  ),
  'installed' => true,
);

List of activated apps:
Straight out of the box

Are you using external storage, if yes which one: local/smb/sftp/…
no

Are you using encryption: yes/no
no

Are you using an external user-backend, if yes which one:

Client configuration

Browser:
Google Chrome Version 80.0.3987.149 (Official Build) (64-bit)

Operating system:
Windows 10 Pro 64 bit version 1809

Logs

Web server error log

I don’t have access, support staff at bluehost assure me that the logs show no errors.

ownCloud log (data/owncloud.log)

{"reqId":"XoD3dhUgHbK9a7gjNmhUvwAABNU","level":2,"time":"2020-03-29T19:26:47+00:00","remoteAddr":"49.196.15.50","user":"DanChristos","app":"dav","method":"DELETE","url":"\/remote.php\/dav\/uploads\/DanChristos\/web-file-upload-557572ccdd5408387a9fd83d15c482e9-1585509996147","message":"Could not get node for path: \"uploads\/DanChristos\/web-file-upload-557572ccdd5408387a9fd83d15c482e9-1585509996147\" : File with name \/\/web-file-upload-557572ccdd5408387a9fd83d15c482e9-1585509996147 could not be located"}
{"reqId":"XoEAheh3xOdqbOdd-s6MtgAAASg","level":3,"time":"2020-03-29T20:09:41+00:00","remoteAddr":"167.172.170.4","user":"--","app":"index","method":"GET","url":"\/index.php\/apps\/files_sharing\/ajax\/publicpreview.php?file=%2FPachamama%2FRainbow+Musicians+-+Pachamama+Backing+Track.mp3&c=5b03adc1999349b233da63cc1b672ee8&x=112&y=112&t=4eIuvbSgGWtD4Bv","message":"Exception: {\"Exception\":\"Error\",\"Message\":\"Call to a member function file_get_contents() on null\",\"Code\":0,\"Trace\":\"#0 \\\/home4\\\/fluidweb\\\/public_html\\\/owncloud\\\/lib\\\/private\\\/legacy\\\/image.php(573): OC\\\\Files\\\\Filesystem::file_get_contents('\\\/home4\\\/fluidweb...')\\n#1 \\\/home4\\\/fluidweb\\\/public_html\\\/owncloud\\\/lib\\\/private\\\/Preview\\\/MP3.php(91): OC_Image->loadFromFile('\\\/home4\\\/fluidweb...')\\n#2 \\\/home4\\\/fluidweb\\\/public_html\\\/owncloud\\\/lib\\\/private\\\/Preview\\\/MP3.php(75): OC\\\\Preview\\\\MP3->getNoCoverThumbnail()\\n#3 \\\/home4\\\/fluidweb\\\/public_html\\\/owncloud\\\/lib\\\/private\\\/Preview.php(1129): OC\\\\Preview\\\\MP3->getThumbnail(Object(OC\\\\Files\\\\Node\\\\File), 2048, 2048, false)\\n#4 \\\/home4\\\/fluidweb\\\/public_html\\\/owncloud\\\/lib\\\/private\\\/Preview.php(768): OC\\\\Preview->generatePreview()\\n#5 \\\/home4\\\/fluidweb\\\/public_html\\\/owncloud\\\/lib\\\/private\\\/Preview.php(793): OC\\\\Preview->getPreview()\\n#6 \\\/home4\\\/fluidweb\\\/public_html\\\/owncloud\\\/apps\\\/files_sharing\\\/ajax\\\/publicpreview.php(120): OC\\\\Preview->showPreview()\\n#7 \\\/home4\\\/fluidweb\\\/public_html\\\/owncloud\\\/lib\\\/private\\\/Route\\\/Route.php(155): require_once('\\\/home4\\\/fluidweb...')\\n#8 \\\/home4\\\/fluidweb\\\/public_html\\\/owncloud\\\/lib\\\/private\\\/Route\\\/Router.php(342): OC\\\\Route\\\\Route->OC\\\\Route\\\\{closure}(NULL)\\n#9 \\\/home4\\\/fluidweb\\\/public_html\\\/owncloud\\\/lib\\\/base.php(920): OC\\\\Route\\\\Router->match('\\\/apps\\\/files_sha...')\\n#10 \\\/home4\\\/fluidweb\\\/public_html\\\/owncloud\\\/index.php(54): OC::handleRequest()\\n#11 {main}\",\"File\":\"\\\/home4\\\/fluidweb\\\/public_html\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Filesystem.php\",\"Line\":864}"}
{"reqId":"XoEA4@99f2VLPrJZ4AOUQAAABqI","level":3,"time":"2020-03-29T20:11:16+00:00","remoteAddr":"167.172.170.4","user":"--","app":"index","method":"GET","url":"\/index.php\/apps\/files_sharing\/ajax\/publicpreview.php?file=%2FPachamama%2FRainbow+Musicians+-+Pachamama+Backing+Track.mp3&c=5b03adc1999349b233da63cc1b672ee8&x=112&y=112&t=4eIuvbSgGWtD4Bv","message":"Exception: {\"Exception\":\"Error\",\"Message\":\"Call to a member function file_get_contents() on null\",\"Code\":0,\"Trace\":\"#0 \\\/home4\\\/fluidweb\\\/public_html\\\/owncloud\\\/lib\\\/private\\\/legacy\\\/image.php(573): OC\\\\Files\\\\Filesystem::file_get_contents('\\\/home4\\\/fluidweb...')\\n#1 \\\/home4\\\/fluidweb\\\/public_html\\\/owncloud\\\/lib\\\/private\\\/Preview\\\/MP3.php(91): OC_Image->loadFromFile('\\\/home4\\\/fluidweb...')\\n#2 \\\/home4\\\/fluidweb\\\/public_html\\\/owncloud\\\/lib\\\/private\\\/Preview\\\/MP3.php(75): OC\\\\Preview\\\\MP3->getNoCoverThumbnail()\\n#3 \\\/home4\\\/fluidweb\\\/public_html\\\/owncloud\\\/lib\\\/private\\\/Preview.php(1129): OC\\\\Preview\\\\MP3->getThumbnail(Object(OC\\\\Files\\\\Node\\\\File), 2048, 2048, false)\\n#4 \\\/home4\\\/fluidweb\\\/public_html\\\/owncloud\\\/lib\\\/private\\\/Preview.php(768): OC\\\\Preview->generatePreview()\\n#5 \\\/home4\\\/fluidweb\\\/public_html\\\/owncloud\\\/lib\\\/private\\\/Preview.php(793): OC\\\\Preview->getPreview()\\n#6 \\\/home4\\\/fluidweb\\\/public_html\\\/owncloud\\\/apps\\\/files_sharing\\\/ajax\\\/publicpreview.php(120): OC\\\\Preview->showPreview()\\n#7 \\\/home4\\\/fluidweb\\\/public_html\\\/owncloud\\\/lib\\\/private\\\/Route\\\/Route.php(155): require_once('\\\/home4\\\/fluidweb...')\\n#8 \\\/home4\\\/fluidweb\\\/public_html\\\/owncloud\\\/lib\\\/private\\\/Route\\\/Router.php(342): OC\\\\Route\\\\Route->OC\\\\Route\\\\{closure}(NULL)\\n#9 \\\/home4\\\/fluidweb\\\/public_html\\\/owncloud\\\/lib\\\/base.php(920): OC\\\\Route\\\\Router->match('\\\/apps\\\/files_sha...')\\n#10 \\\/home4\\\/fluidweb\\\/public_html\\\/owncloud\\\/index.php(54): OC::handleRequest()\\n#11 {main}\",\"File\":\"\\\/home4\\\/fluidweb\\\/public_html\\\/owncloud\\\/lib\\\/private\\\/Files\\\/Filesystem.php\",\"Line\":864}"}

Browser log

Javascript errors:
jquery.js:8630 PUT http://cloud.danchristos.online/remote.php/dav/files/DanChristos/Documents/Dan%20Christos%20-%20Clap%20Challenge%20(draft%202020-02-24).mp3 406 (Not Acceptable)
send @ jquery.js:8630
ajax @ jquery.js:8166
send @ jquery.fileupload.js?v=0ebab7d51da6b2fe9520d5454172232f:958
(anonymous) @ jquery.js:3256
j @ jquery.js:3099
add @ jquery.js:3145
(anonymous) @ jquery.js:3255
each @ jquery.js:374
(anonymous) @ jquery.js:3252
a.Deferred @ jquery-migrate.min.js?v=0ebab7d51da6b2fe9520d5454172232f:2
then @ jquery.js:3251
_onSend @ jquery.fileupload.js?v=0ebab7d51da6b2fe9520d5454172232f:1003
(anonymous) @ jquery-ui.custom.js?v=0ebab7d51da6b2fe9520d5454172232f:405
data.submit @ jquery.fileupload.js?v=0ebab7d51da6b2fe9520d5454172232f:721
(anonymous) @ file-upload.js?v=0ebab7d51da6b2fe9520d5454172232f:286
(anonymous) @ jquery.js:3256
j @ jquery.js:3099
add @ jquery.js:3145
(anonymous) @ jquery.js:3255
each @ jquery.js:374
(anonymous) @ jquery.js:3252
a.Deferred @ jquery-migrate.min.js?v=0ebab7d51da6b2fe9520d5454172232f:2
then @ jquery.js:3251
submit @ file-upload.js?v=0ebab7d51da6b2fe9520d5454172232f:285
(anonymous) @ file-upload.js?v=0ebab7d51da6b2fe9520d5454172232f:650
_.each._.forEach @ underscore.js?v=0ebab7d51da6b2fe9520d5454172232f:186
submitUploads @ file-upload.js?v=0ebab7d51da6b2fe9520d5454172232f:648
onNoConflicts @ file-upload.js?v=0ebab7d51da6b2fe9520d5454172232f:1105
checkExistingFiles @ file-upload.js?v=0ebab7d51da6b2fe9520d5454172232f:865
add @ file-upload.js?v=0ebab7d51da6b2fe9520d5454172232f:1127
_trigger @ jquery-ui.custom.js?v=0ebab7d51da6b2fe9520d5454172232f:789
(anonymous) @ jquery.fileupload.js?v=0ebab7d51da6b2fe9520d5454172232f:1090
each @ jquery.js:374
_onAdd @ jquery.fileupload.js?v=0ebab7d51da6b2fe9520d5454172232f:1083
(anonymous) @ jquery-ui.custom.js?v=0ebab7d51da6b2fe9520d5454172232f:405
(anonymous) @ jquery.fileupload.js?v=0ebab7d51da6b2fe9520d5454172232f:1289
j @ jquery.js:3099
add @ jquery.js:3145
always @ jquery.js:3246
_onChange @ jquery.fileupload.js?v=0ebab7d51da6b2fe9520d5454172232f:1279
(anonymous) @ jquery-ui.custom.js?v=0ebab7d51da6b2fe9520d5454172232f:405
handlerProxy @ jquery-ui.custom.js?v=0ebab7d51da6b2fe9520d5454172232f:706
dispatch @ jquery.js:4435
r.handle @ jquery.js:4121
Show 14 more frames
file-upload.js?v=0ebab7d51da6b2fe9520d5454172232f:411 Uncaught TypeError: Cannot read property 'documentElement' of undefined
    at OC.FileUpload.getResponse (file-upload.js?v=0ebab7d51da6b2fe9520d5454172232f:411)
    at HTMLInputElement.fail (file-upload.js?v=0ebab7d51da6b2fe9520d5454172232f:1224)
    at $.<computed>.<computed>._trigger (jquery-ui.custom.js?v=0ebab7d51da6b2fe9520d5454172232f:789)
    at $.<computed>.<computed>._onFail (jquery.fileupload.js?v=0ebab7d51da6b2fe9520d5454172232f:928)
    at $.<computed>.<computed>._onFail (jquery-ui.custom.js?v=0ebab7d51da6b2fe9520d5454172232f:405)
    at Object.<anonymous> (jquery.fileupload.js?v=0ebab7d51da6b2fe9520d5454172232f:962)
    at j (jquery.js:3099)
    at Object.fireWith [as rejectWith] (jquery.js:3211)
    at x (jquery.js:8266)
    at XMLHttpRequest.<anonymous> (jquery.js:8605)

Oh, something went wrong with the formatting there… Let me know if I need to repost anything.
So the javascript error is suggesting that the PUT request is not getting through? Bluehost support staff assure me that PUT method is enabled.

I’ve also made sure that php max file size is high enough.

406 (Not Acceptable)

I don’t think this error is sent by ownCloud. There might be some header used by ownCloud that might make the web server to choke, so it’s likely a web server configuration problem.
You might want to test something in a different server to verify it works.

1 Like

Perhaps your upload took too long and PHP deleted the files already? Log into the server and check the upload path during an upload.

Hello - I am having this exact same error for large file uploads on owncloud 10.7 running on a UCS Univention Server 5.0. Did you ever figure out what this is? I have tried everything, configured every php file, htaccess, .user.ini in sight nd still cannot upload anything larger than about 8-10mbs - ANY HELP APPRECIATED!!! It is driving me mad