Recommendation for a PHP class to upload large files in chunks #upload large files in chunks
Edit
by Arrigo Capitanio - 3 years ago (2021-08-17)
Upload large files in chunks checking progress
| I wish to upload large files in chunks, checking progress, stop and resume. |
Ask clarification
2 Recommendations
This package can process file uploads and verify large files.
It provides a script that generates a form and can process the file upload with JavaScript code.
The script can calculate a checksum value of each part of file contents using JavaScript.
On the server side, the package can store the uploaded file and the checksum values to verify if the checksum values are what was calculated on the client side to verify the integrity of the file upload.
| by Dantigny francois package author 30 - 2 years ago (2023-03-02) Comment
Hi ! I've tried to solve my problem with BFUV ( https://www.phpclasses.org/package/12463-PHP-Process-file-uploads-and-verify-large-files.html ). No "stop and resume" : sorry ! |
Class that generates HTML forms supporting:
- Multiple inputs may be interconnected in such way that client side events that occur on one input can trigger actions on the context of other inputs. Developers may use input interconnection support without writing Javascript code.
- Can be extended with new types of input controls plug-in classes.
- Custom input plug-in classes can be used to support for handling client site events on the server side without submitting the form or redrawing the whole form page
- Some control plug-in classes are made available:
* AJAX based form submission (without reloading the whole page)
* Auto-complete text inputs
* Select a location on a map using Google Maps API
* Calendar date input
* CAPTCHA test to prevent automated access by robots
* Linked select input to switch select options when the value of another input changes. An unlimited number of selected can be linked in cascade. Additional plug-in subclasses are provided to retrive option groups from a MySQL database or many other SQL databases using the Metabase PEAR::MDB2 PHP database abstraction layer APIs
* Manage animations that apply visual effects to the page form elements, like: fade-in, fade-out, show, hide, update content, etc..
- XHTML compliant output.
- Load submitted form field values even with register_globals option Off and strip slashes when magic_quotes_gpc option is On.
- Keyboard navigation support:
* Attachment of labels with activation keys to each form field.
* Tab navigation order index.
- Built-in server side (PHP based) and client side (Javascript 1.0 or better) field validation for:
* E-mail address
* Credit card numbers (Visa, Mastercard, American Express, Discover, Diners Club, Carte Blanche, enRoute, JCB, any of these or even determined by a select field).
* Regular expressions.
* Field not empty.
* Field equal to another (useful for password confirmation fields).
* Field different from another (useful for reminder fields that must not be equal to the actual password).
* As set (for check boxes, radio buttons and select multiple fields).
* As integer number (with range limitation).
* As floating point number (with range limitation).
* Programmer defined client and server validation functions.
- Highlight invalid fields rendering them distinct CSS styles
- Security attack prevention by optionally discarding invalid values passed in fields that could not be edited by users but may be spoofed by attackers.
- Option to define a value that, when used in a field, it is accepted without performing any of the validations defined for the field.
- Ability to stop the user from submiting a form more than once inadvertdly.
- Sub form validation (validate only smaller set of field depending on the submit button that was used).
- Composition and generation of the form HTML output with fields displayed as fully accessible or in read-only mode.
- Generation of Javascript functions (useful to set to the page ONLOAD event):
* Set the input focus to a field.
* Select the text of a field.
* Set the input focus and select the text of a field.
* Enable and disable input fields
- Automatic capitalization of the text of a field:
* Upper case.
* Lower case.
* Word initials
- Replacement of text field expressions to perform adjustments like trimming whitespace or auto-complete values based on rules defined by regular expressions
- Compose forms with templates using plain HTML files with embedded PHP code or using the Smarty template engine with a supplied pre-filter plugin
- Etc.
| by Manuel Lemos package author 26695 - 3 years ago (2021-08-18) Comment
This package for form generating and submission processing comes with a plugin for file uploading. It may need to be updated depending on the PHP version that you may be using as it depends on a PHP extension. Anyway, it can display an upload progress bar.
As for resuming file uploads, it depends on JavaScript code that runs on the browser side.
Maybe one of our colleague PHP developers in the site can share a more complete solution that includes upload resuming support. |
- 1 Comment
1.
by Sriram - 3 years ago (2021-08-26) Reply
I have an idea that i have done 90% POC for above requirement. Upload to happen in async, 6 requests in parallel (as browsers queues up subsequent after 6), aiming to have es6 js front end that renders via php (currently poc in jquery) and php in server side processing.
need to add this control of pause resume(TBD) (with a server side async call to record the status and keep the chunks numbers and alive for a pre determined period?)
the approach am planning can handle very large files to upload without any timeouts)
not fault tolerant (re-run if one upload chunk returns a non 200, TBD)
more than anything. need the time to do this :)