File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -342,11 +342,11 @@ wp gdrive about
342342### Upload Files or Folder
343343
344344``` console
345- wp gdrive upload <path> [<UploadTo>] [--name=<file_name>] [--zip] [--force]
345+ wp gdrive upload [ <path>] [<UploadTo>] [--name=<file_name>] [--zip] [--force]
346346```
347347
348348path
349- : The path of file or folder for Upload.
349+ : The path of file or folder for Upload. ` default is current path `
350350
351351UploadTo
352352: The path dir where the file will be saved in Google Drive.
@@ -362,6 +362,12 @@ UploadTo
362362
363363---
364364
365+ Automatic create zip file archive file from all root directory and files and upload to GDrive:
366+
367+ ``` console
368+ wp gdrive upload --zip
369+ ```
370+
365371Upload backup.zip file to root dir in Google Drive:
366372
367373``` console
Original file line number Diff line number Diff line change @@ -972,7 +972,7 @@ function get($_, $assoc)
972972 *
973973 * ## OPTIONS
974974 *
975- * <path>
975+ * [ <path>]
976976 * : The path of file or folder for Upload.
977977 *
978978 * [<UploadTo>]
@@ -1040,6 +1040,9 @@ function upload($_, $assoc)
10401040 }
10411041
10421042 // Prepare File Path
1043+ if ( ! isset ($ _ [0 ])) {
1044+ $ _ [0 ] = "/ " ;
1045+ }
10431046 $ file_path = \WP_CLI_FileSystem::path_join (WP_CLI_Util::getcwd (), WP_CLI_Google_Drive::sanitize_path (trim ($ _ [0 ])));
10441047 if ( ! file_exists ($ file_path )) {
10451048 WP_CLI_Helper::pl_wait_end ();
You can’t perform that action at this time.
0 commit comments