Method: IntelligentUtils#create_upload_job_chunks

Defined in:
lib/filestack/utils/utils.rb

#create_upload_job_chunks(jobs, state, apikey, filename, filepath, filesize, start_response) ⇒ Array

Loop and run chunks for each offset

Parameters:

  • jobs (Array)

    A list of file parts

  • state (IntelligentState)

    An IntelligentState object

  • apikey (String)

    Filestack API key

  • filename (String)

    Name of incoming file

  • filepath (String)

    Local path to the file

  • filesize (Int)

    Size of incoming file

  • start_response (Typhoeus::Response)

    Response body from multipart_start

Returns:

  • (Array)


260
261
262
263
264
265
266
267
# File 'lib/filestack/utils/utils.rb', line 260

def create_upload_job_chunks(jobs, state, apikey, filename, filepath, filesize, start_response)
  jobs.each { |job|
    job[:chunks] = chunk_job(
      job, state, apikey, filename, filepath, filesize, start_response
    )
  }
  jobs
end