File tree Expand file tree Collapse file tree 4 files changed +19
-8
lines changed
Expand file tree Collapse file tree 4 files changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -19,19 +19,23 @@ export default {
1919 " backup-listing" : Listing,
2020 " backup-actions" : Actions,
2121 },
22+ props: {
23+ chunkSize: {
24+ type: Number ,
25+ default: 1 * 1024 * 1024 , // 1MB
26+ },
27+ },
2228 created () {
29+ console .log (this .chunkSize )
30+ window .backup = {
31+ chunkSize: this .chunkSize
32+ };
33+
2334 if (! this .$store .hasModule (' backup-provider' )) {
2435 this .$store .registerModule (' backup-provider' , store);
2536 this .$store .dispatch (' backup-provider/pollEndpoint' );
2637 }
2738 },
28- data () {
29- return {
30- serverState: " initializing" ,
31- uploads: [],
32- url: cp_url (" /backups" ),
33- };
34- },
3539 destroy () {
3640 this .$store .dispatch (' backup-provider/stopPolling' );
3741 this .$store .unregisterModule (' backup-provider' );
Original file line number Diff line number Diff line change @@ -51,6 +51,8 @@ export default {
5151 " X-CSRF-TOKEN" :
5252 document .querySelector (" input[name=_token]" ).value ,
5353 },
54+ chunkSize: window .backup .chunkSize || 1 * 1024 * 1024 , // 1MB
55+ forceChunkSize: true ,
5456 maxChunkRetries: 1 ,
5557 maxFiles: 1 ,
5658 testChunks: false ,
Original file line number Diff line number Diff line change 1010 'path ' => 'statamic-backups ' ,
1111 ],
1212
13+ /**
14+ * The upload chunk size
15+ */
16+ 'chunk_size ' => 2 * 1024 * 1024 ,
17+
1318 /**
1419 * The directory where backup will put metadata files
1520 */
Original file line number Diff line number Diff line change 55
66@csrf
77
8- <itiden-backup />
8+ <itiden-backup :chunk-size = " {{ config ( ' backup.chunk_size ' ) } } " />
99
1010@endsection
You can’t perform that action at this time.
0 commit comments