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
uses **chunked writing** aswell to minimize the memory footprint
60
60
***Storing per Laravel Session to prevent overwrite**
61
-
all TMP files are stored with session token
61
+
all TMP files are stored with session token. The JS library must send the **cookies** to successfully work (or you can use browser - with fallback support).
62
62
*[**Clear command and schedule**](#uploads:clear)
63
63
the package registers the shedule command (uploads:clear) that will clear all unfinished chunk uploads
64
64
***Automatic handler selection** since `v0.2.4` you can use automatic detection selection the handler
@@ -71,7 +71,7 @@ to use from the current supported providers. You can also register your own hand
71
71
1. Create a Upload controller. If using Laravel 5.4 and above, add your upload controller into `web` route. If
72
72
necessary, add to `api` routes and change the config to use IP for chunk name.
73
73
2. Implement your Javascript code (you can use the same code as below or in example repository)
74
-
3.__Check if your library is sending `cookie`, the chunk naming uses session (you can [change it](#unique-naming) - will use only IP address)__
74
+
3.__Check if your library is sending `cookie` in post, the chunk naming uses session (you can [change it](#unique-naming) - will use only IP address)__
75
75
4. Implement the FileReceiver (example below).
76
76
**Chunk upload works only withing local storage.** If you need to upload the file to the cloud you can do it only after the chunks are merged `$receiver->isFinished() === true`. Instead of using
77
77
`move` function get the contents of your file and upload it to cloud. More can be found (here)[https://github.com/pionl/laravel-chunk-upload-example/issues/5#issuecomment-359793775]
@@ -96,17 +96,25 @@ which does nothing at this moment.
96
96
97
97
The full example (Laravel 5.4 - works same on previous versions) can be found in separate repository [laravel-chunk-upload-example](https://github.com/pionl/laravel-chunk-upload-example)
98
98
with DropZone and jQuery-File-Upload implementation.
You must send `_token` if you are using web route. For `api` session is not used (must be inited by middleware).
107
+
100
108
### Laravel controller
101
109
* Create laravel controller `UploadController` and create the file receiver with the desired handler.
102
110
* You must import the full namespace in your controller (`use`).
103
111
* When upload is finished, don't forget to **move the file to desired folder (as standard UploadFile implementation)**.
104
-
You can check the example project.
112
+
You can check the example project. If you are uploading the contents of the file to cloud, don`t forget to delete it.
105
113
* An example of save function below the handler usage
106
114
107
115
#### Dynamic handler usage
108
116
109
-
The correct handler for your JS provider will be selected automatically based on the sent request. This is the easies init.
117
+
The correct handler for your JS provider will be selected automatically based on the sent request. This is the easies usage.
110
118
111
119
##### With dependency injection
112
120
@@ -323,7 +331,8 @@ The logic supports also using the `Session::getId()`, but you need to force your
323
331
You can update the `chunk.name.use` settings for custom usage.
324
332
325
333
#### Cross domain request
326
-
When using uploader for the cross domain request you must setup the `chunk.name.use` to browser logic instead of session.
334
+
When using uploader for the cross domain request you must setup the `chunk.name.use` to browser logic instead of session. From version `1.1.4` the session
335
+
is uses only if initialized by the laravel (if using api endpoint it will not be initialized and browser data will be used as fallback).
327
336
328
337
"use" => [
329
338
"session" => false, // should the chunk name use the session id? The uploader muset send cookie!,
@@ -384,48 +393,6 @@ or pass as second parameter when using
* Removed Laravel dependency in favor of Illuminate packages (#21)
392
-
393
-
### Since 1.1.2
394
-
* Added support for Auto-Discovery (thanks to @laravelish - [#20](https://github.com/pionl/laravel-chunk-upload/pull/20))
395
-
396
-
### Since 1.1.1
397
-
* Added support for Laravel 5.5 (thanks to @Colbydude - [#18](https://github.com/pionl/laravel-chunk-upload/pull/18))
398
-
399
-
### Since 1.1.0
400
-
* If there is an error while upload, exception will be thrown on init.
401
-
402
-
### Since 1.0.3
403
-
* Enabled to construct the `FileReceiver` with dependency injection - the fasted way.
404
-
* Removed the `getChunkFile` and added `getUploadedFile` for all Save classes. Returns always the uploaded file (the uploaded chunk).
405
-
406
-
### Since 1.0.2
407
-
* Added resumable.js
408
-
* Added `getChunkFile` method in `ChunkSave` for returning only the chunk file
409
-
410
-
### Since 1.0.1
411
-
* Added support for passing file object instead of fileIndex (example: multiple files in a request). Change discussion in #7 (@RAZORzdenko), merged in #8
412
-
413
-
### Since 1.0.0
414
-
415
-
* Updated composer to support Laravel 5.4
416
-
417
-
### Since v0.3
418
-
419
-
* Support for cross domain requests (only chunk naming)
420
-
* Added support for [plupload package](https://github.com/moxiecode/plupload)
421
-
* Added automatic handler selection based on the request
422
-
423
-
### Since v0.2.0
424
-
425
-
The package supports the Laravel Filesystem. Because of this, the storage must be withing the app folder `storage/app/` or custom drive (only local) - can be set in the config `storage.disk`.
426
-
427
-
The cloud drive is not supported because of the chunked write (probably could be changed to use a stream) and the resulting object - `UploadedFile` that supports only full path.
0 commit comments