You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This library is compatible with HTML5 file upload library: https://github.com/flowjs/flow.js
12
12
13
-
Installation
13
+
How to get started?
14
14
--------------
15
-
For easy installation you need to have Composer installed, if you don't please read installation document for Composer athttps://getcomposer.org/download/.
Note that you could also use ```use``` keyword to add each class inidividually into our current namespace. At this point you are ready to use flow. for more information about how to use it read Basic Usage section.
34
+
require_once './vendor/autoload.php';
40
35
41
-
Basic Usage
42
-
--------------
43
-
```php
44
-
if (\Flow\Basic::save('./final_file_destination', './chunks_temp_folder')) {
36
+
$config = new \Flow\Config();
37
+
$config->setTempDir('./chunks_temp_folder');
38
+
$request = new \Flow\Request();
39
+
if (\Flow\Basic::save('./' . $request->getIdentifier(), $config, $request)) {
45
40
// file saved successfully and can be accessed at './final_file_destination'
46
41
} else {
47
42
// This is not a final chunk or request is invalid, continue to upload.
48
43
}
49
44
```
45
+
50
46
Make sure that `./chunks_temp_folder` path exists. All chunks will be save in this temporary folder.
51
47
52
48
If you are stuck with this example, please read this issue: [How to use the flow-php-server](https://github.com/flowjs/flow-php-server/issues/3#issuecomment-46979467)
0 commit comments