Filestack\UploadProcessor
Object used by the Filestack client to process an upload task.
Synopsis
- // members
- public $api_key;
- protected $security;
- protected $intelligent;
- // methods
- public void __construct()
- public void intelligenceEnabled()
- public void setIntelligent()
- public json registerUploadTask()
- public array['statuscode' run()
- protected Filestack/Filelink createParts()
- protected json processParts()
- protected Promises processChunks()
- protected int commitPart()
- protected int uploadChunkToS3()
- protected json registerComplete()
- protected void buildChunkData()
- protected void buildCommitData()
- protected void getChunkContent()
- protected void appendSecurity()
- protected void multipartGetTags()
- protected void handleS3PromisesResult()
- // Inherited methods from CommonMixin
- protected string getCustomUrl()
- public bool isUrl()
- public int get_retry_miliseconds()
- public bool sendDelete()
- protected bool sendDownload()
- public void addDownloadFlagToUrl()
- protected string sendGetContent()
- protected array sendGetMetaData()
- protected json sendGetSafeForWork()
- protected json sendGetTags()
- public Filelink sendOverwrite()
- protected Filelink handleResponseCreateFilelink()
- protected array handleResponseDecodeJson()
- protected void sendRequest()
- protected void getSourceHeaders()
- protected void addRequestSourceHeader()
- protected void appendData()
- protected void appendPromise()
- protected void settlePromises()
Hierarchy
Coverage
Methods | 0% | 0 / 17 |
Lines | 0% | / |
Members
protected
- $http_client
- $http_promises
- $intelligent
- $security
- $source_header
- $user_agent_header
public
- $api_key
- $cname
Methods
protected
- appendSecurity() — Append security params
- buildChunkData() — Create data multipart data for multipart upload api request
- buildCommitData()
- commitPart() — All chunks of this part has been uploaded. We have to call commit to let the uploader API knows.
- createParts() — Take a file and separate it into parts, creating an array of parts to process.
- getChunkContent() — Get a chunk from a file given starting seek point.
- handleS3PromisesResult() — Handle results of promises after async calls
- multipartGetTags() — Parse results of s3 calls and append to parts_etags array
- processChunks() — Process the chunks of a part the file to server.
- processParts() — Process the parts of the file to server.
- registerComplete() — Trigger the end of an upload task
- uploadChunkToS3() — Upload a chunk of data to S3
public
- __construct() — UploadProcessor constructor
- intelligenceEnabled()
- registerUploadTask() — Trigger the start of an upload task
- run() — Run upload process, including splitting up the file and sending parts concurrently in chunks.
- setIntelligent()
Inherited from Filestack\Mixins\CommonMixin
protected
- addRequestSourceHeader() — Append source header to request headers array
- appendData() — Append a data item
- appendPromise()
- getCustomUrl() — If CNAME is set, return custom CNAME URL, else, noop.
- getSourceHeaders() — Get source header
- handleResponseCreateFilelink() — Handle a Filestack response and create a filelink object
- handleResponseDecodeJson() — Handles a response. decode and return json if 200, throws exception otherwise.
- sendDownload() — Download a file to specified destination given a url
- sendGetContent() — Get the content of a file.
- sendGetMetaData() — Get the metadata of a remote file. Will only retrieve specific fields if optional fields are passed in
- sendGetSafeForWork() — Get the safe for work (sfw) flag of a filelink.
- sendGetTags() — Get the tags of a filelink.
- sendRequest() — Send request
- settlePromises()
public
- addDownloadFlagToUrl() — Append the download flag to a url that may or may not have existing query string flags
- get_retry_miliseconds() — Get the miliseconds of exponential backoff retry strategy
- isUrl() — Check if a string is a valid url.
- sendDelete() — Delete a file from cloud storage
- sendOverwrite() — Overwrite a file in cloud storage
History
-
2019-06-07T17:01:05+00:00 (commit #ba60795)
Author: Colin Sheaff (colin-sheaff@northwestern.edu) / Commiter: Colin Sheaff (colin-sheaff@northwestern.edu)
Improved custom CNAME implementation and coverage.
-
2017-09-08T18:59:02+00:00 (commit #ecf343e)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
upload() should return filelink not json
-
2017-08-16T17:41:07+00:00 (commit #4e28363)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
added phpdox for documentation generation generated docs using phpdox
-
2017-08-16T16:39:59+00:00 (commit #674be05)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
added phpdox for documentation generation
-
2017-08-10T21:26:53+00:00 (commit #5c048b4)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
updated Intelligent Ingestion as an option
-
2017-08-09T01:13:18+00:00 (commit #b2e4007)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
partnum in etag bug fixed
-
2017-08-06T19:50:58+00:00 (commit #a854fee)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
error handling strategy for intelligent flow
-
2017-07-31T20:16:42+00:00 (commit #68bcf40)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
UploadProcessor 100% coverage passing tests
-
2017-07-28T19:46:31+00:00 (commit #1e77dd6)
Author: Huey Ly (huey@webmail.us) / Commiter: Huey Ly (huey@webmail.us)
added UploadProcessor with intelligent ingestion logic