Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Web Based File Upload Chunking #8955

Closed
matart opened this issue Jun 9, 2014 · 19 comments
Closed

Web Based File Upload Chunking #8955

matart opened this issue Jun 9, 2014 · 19 comments

Comments

@matart
Copy link

matart commented Jun 9, 2014

Steps to reproduce

Web based large file upload

Expected behaviour

File gets chunked and multiple ajax requests send the chunks to the server for reassembly

Actual behaviour

File is uploaded as a whole file. A single request is made

Server configuration

Operating system: RHEL 6

Web server: NGINX

Database: MySQL

PHP version: 5.5

ownCloud version: 6.0.3

Updated from an older ownCloud or fresh install:

List of activated apps: Files, Activity, Contacts, Pictures

The content of config/config.php:

I had to remove the identifying URLs so it seems a little empty.

<?php
$CONFIG = array (
  'instanceid' => 'oc8fdcdb7be6',
  'passwordsalt' => '',
  'datadirectory' => '/var/www/html/macdrop_assets',
  'dbtype' => 'mysql',
  'version' => '6.0.3.1',
  'dbname' => '',
  'dbhost' => '',
  'dbtableprefix' => '',
  'dbuser' => '',
  'dbpassword' => '',
  'installed' => true,
  'forcessl' => true,
  'theme' => 'macdrop',
  'proxy' => '',
  'loglevel' => '2',
  'maxZipInputSize' => 1073741824,
  'allowZipDownload' => true,
  'mail_domain' => '',
  'mail_smtphost' => '',
  'mail_smtpname' => 'macDrop',
  'maintenance' => false,
  'trusted_domains' => 
  array (
    0 => 'url1',
    1 => 'url2',
  ),
);

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

Are you using encryption: yes/no

Client configuration

Browser: Chrome

Operating system: Windows

Browser log

This is a 1.7GB file. One request taking 3.2 minutes.
no_chunk

If this feature does not exist I am willing to look into implementing it and making a pull request.

@karlitschek
Copy link
Contributor

I think this feature doesn´t exist at the moment. So a pull request would be awesome. @butonic Haven´t you looked into that last year?

@ghost
Copy link

ghost commented Jun 9, 2014

AFAIK there is already a discussion / feature request for chunked file uploading available at the bugtracker but i can't find it at the moment. Will see if i can dig this out tomorrow.

@matart
Copy link
Author

matart commented Jun 9, 2014

That would be great. Thank you! Thank you,Mathew A. From: RealRancorSent: Monday, June 9, 2014 4:53 PMTo: owncloud/coreReply To: owncloud/coreCc: Mathew ArtemenkoSubject: Re: [core] Web Based File Upload Chunking (#8955)AFAIK there is already a discussion / feature request for chunked file uploading available at the bugtracker but i can't find it at the moment. Will see if i can dig this out tomorrow.

—Reply to this email directly or view it on GitHub.

@PVince81
Copy link
Contributor

I believe I heard that some app, maybe this one http://apps.owncloud.com/content/show.php/Large+File+Upload?content=159291 was using HTML5 file chunking of some sort.

@DeepDiver1975 DeepDiver1975 modified the milestone: backlog Mar 21, 2015
@tylla
Copy link

tylla commented May 15, 2015

Yes that app was working until OC 8.0. Now it is defunct and the maintainer has some problems fixing it.
I believe too that this functionality should be implemented as a core functionality, so someone with enough knowledge should take a look at that app's code and merge it to the core. Unfortunately I'm not that person.:(

@PVince81
Copy link
Contributor

Yes, would be a nice addition.

Note that there are plans to make the web UI use WebDAV first: #12353

This means it will become possible to use chunking too through the WebDAV endpoint.

@tylla
Copy link

tylla commented May 15, 2015

As I found out, OC 8 uses jQuery-File-Upload and as I discovered here jQuery-File-Upload already supports chunked uploading. One only has to override the maxChunkSize variable with some sane value instead of the default "undefined", and after that the upload starts to send chunks with the specified size instead of whole files.
For testing I changed to
maxChunkSize: 1000000, // 1MB

One problem exists though. At the end of the upload there is an error message that asks whether I want to overwrite the same file with the same file. If it's gibberish what I say, there is a screenshot attached. There you can see that the already uploaded image is only the first chunk (there is some missing data from the image too) and asks me to overwrite it with the full file. But if I choose the newer or both files it just hangs after I click the Continue button. After this I can click the Cancel, but then I'm also only with the partial file.
BTW it throws a console error when I click the Continue button:
TypeError: data.formData.push is not a function
data.formData.push({name:'resolution', value:'autorename'}); //hack for ie8
file-upload.js?v=8ca31e8dc30c45c0bf2c0abdfb1746bd (line 155, col 42)

Hmm, this starts to look as a bug report... maybe I should file it as such.

owncloud_chunk_upload_error

@PVince81
Copy link
Contributor

But also I believe that the ajax/upload.php endpoint does not support chunks, so it probably won't work.
Ideal would be to use the WebDAV endpoint instead.
Note that the WebDAV endpoint uses custom chunking (so does the sync client), so it might not work either with a "standard" solution.

Either way, it will need a bit of work to make this.

Still, any information you post here could be useful for that, so thanks 😄

@PVince81
Copy link
Contributor

I guess it asks you for overwrite because for each chunk sent to upload.php, it saves it as a new file. Because the ajax/upload.php endpoint doesn't understand chunks. And since the file exists already, it shows you that dialog. (just guessing)

@PVince81
Copy link
Contributor

PVince81 commented Oct 7, 2016

PR here #26306

@PVince81 PVince81 added the p1-urgent Critical issue, need to consider hotfix with just that issue label Jul 17, 2017
@PVince81 PVince81 self-assigned this Jul 17, 2017
@PVince81 PVince81 modified the milestones: development, backlog Jul 17, 2017
@PVince81
Copy link
Contributor

new/updated PR here: #28415

@PVince81 PVince81 closed this as completed Aug 3, 2017
@PVince81
Copy link
Contributor

PVince81 commented Aug 4, 2017

Reopening this to address the "public page upload" which cannot use chunking currently due to API limitations: basically the chunking API only works for authenticated clients and needs to be enhanced.

@PVince81 PVince81 reopened this Aug 4, 2017
@PVince81 PVince81 modified the milestones: triage, development Aug 4, 2017
@PVince81
Copy link
Contributor

PVince81 commented Sep 9, 2017

Requires #23269 to provide a public DAV server that supports multiple subpaths like "public.php/dav/uploads".

@hodyroff
Copy link

People can use the guest app. Receiving chunked uploads via webfrontend seems not a P1 priority, adjusting. Please add your vote here if you need this.

@hodyroff hodyroff removed the p1-urgent Critical issue, need to consider hotfix with just that issue label Oct 13, 2017
@PVince81
Copy link
Contributor

What we need to make anonymous upload support chunking:

  • New Webdav endpoint for public file access: Consider new DAV endpoint for public shares #23269
  • Adjust the "uploads" Webdav endpoint to also allow anonymous users to use: I suggest using the share token instead of user id. We also need to make sure that concurrent anonymous users cannot influence each other's uploads.
  • Adjust public link page frontend to use the two points above for file access and uploads

@fritzmg
Copy link

fritzmg commented Dec 23, 2018

I would love to see chunking implemented for public anonymous uploads. This way we can send customers or service partners simply a public link for a folder which has Upload only (File Drop) enabled and they can drop in their files there, which might be several Gigabyte in size, without having to create a guest account.

@PVince81 PVince81 removed their assignment Sep 5, 2019
@hurradieweltgehtunter
Copy link
Contributor

Since we advertise no upload limits on public uploads on certain projects I wanted to raise this topic.

@butonic
Copy link
Member

butonic commented Mar 12, 2021

cc @C0rby

@micbar
Copy link
Contributor

micbar commented Sep 16, 2021

This is a won't fix. We may have this in ownCloud infinite scale where we use tus.io as an upload protocol.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.