Coder Social home page Coder Social logo

Comments (8)

sarvigalava avatar sarvigalava commented on September 18, 2024

if file has 1,5MB it is uploaded entirely

from resumable.js.

sarvigalava avatar sarvigalava commented on September 18, 2024

fixed with :
var lst=0;
if($.file.size/$.resumableObj.opts.chunkSize>0)
lst=1;

  for (var offset=0; offset<Math.floor($.file.size/$.resumableObj.opts.chunkSize)+lst; offset++) {
    $.chunks.push(new ResumableChunk($.resumableObj, $, offset, chunkEvent));
  }

from resumable.js.

sarvigalava avatar sarvigalava commented on September 18, 2024

seems to work but md5sums are different. Need to know if it is a php issue or javascript :(

from resumable.js.

sarvigalava avatar sarvigalava commented on September 18, 2024

fixed :
if ($.fileObjSize-$.endByte < 0) {
// The last chunk will be less than chunkSize
$.endByte = $.fileObjSize;
}

from resumable.js.

steffentchr avatar steffentchr commented on September 18, 2024

Actually this is expected behaviour: That the last chunk is bigger than other chunks -- but smaller than 2*chunkSize. This is the case for two reason: To avoid uploads of byte-size chunks and more relevantly to allow for meta detection in the last chunk of a file. This is something we use ourselves to detect whether an upload is a video file, based only on the first and the last chunk of a resumable upload.

from resumable.js.

sarvigalava avatar sarvigalava commented on September 18, 2024

my php max file size limitation is 2MB so max chunk size must be 2MB in order to be efficient. I must upload big archive 10-12GB on server with limitation without using ftp. Thanks for script it works awesome. One only question : how to verify server response ?

from resumable.js.

steffentchr avatar steffentchr commented on September 18, 2024

If so, the trick is simply to have set the chunk size to be 1 MB. This will also be efficient enough, even at large files. Not really sure what you mean about verifying server reponse?

from resumable.js.

sarvigalava avatar sarvigalava commented on September 18, 2024

I want to send to client error messages (permission denided, already uploaded etc etc)

from resumable.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.