Skip to content

Commit

Permalink
!deploy v2.21.2 - fix for #136
Browse files Browse the repository at this point in the history
## 2.21.2

* [Issue #136](#136)
  * Fixed: `Start-GSDriveFileUpload` failing when specifying a user other than the Admin user to do the upload as.
  • Loading branch information
scrthq authored Dec 24, 2018
2 parents fd498ba + 412a468 commit 6a13459
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 13 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Changelog

* [Changelog](#changelog)
* [2.21.2](#2212)
* [2.21.1](#2211)
* [2.21.0](#2210)
* [2.20.2](#2202)
Expand Down Expand Up @@ -66,6 +67,11 @@

***

## 2.21.2

* [Issue #136](https://github.com/scrthq/PSGSuite/issues/136)
* Fixed: `Start-GSDriveFileUpload` failing when specifying a user other than the Admin user to do the upload as.

## 2.21.1

* [Issue #131](https://github.com/scrthq/PSGSuite/issues/131) - _Free/standard Google Account support_
Expand Down
2 changes: 1 addition & 1 deletion PSGSuite/PSGSuite.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
RootModule = 'PSGSuite.psm1'

# Version number of this module.
ModuleVersion = '2.21.1'
ModuleVersion = '2.21.2'

# ID used to uniquely identify this module
GUID = '9d751152-e83e-40bb-a6db-4c329092aaec'
Expand Down
26 changes: 14 additions & 12 deletions PSGSuite/Public/Drive/Start-GSDriveFileUpload.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,43 @@ function Start-GSDriveFileUpload {
<#
.SYNOPSIS
Starts uploading a file or list of files to Drive asynchronously
.DESCRIPTION
Starts uploading a file or list of files to Drive asynchronously. Allows full folder structure uploads by passing a folder as -Path and including the -Recurse parameter
.PARAMETER Path
The path of the file or folder to upload
.PARAMETER Name
The new name of the file once uploaded
Defaults to the existing name of the file or folder
.PARAMETER Description
The description of the file or folder in Drive
.PARAMETER Parents
The unique Id of the parent folder in Drive to upload the file to
Defaults to the root folder in My Drive
.PARAMETER Recurse
If $true and there is a Directory passed to -Path, this will rebuild the folder structure in Drive under the Parent Id and upload the files within accordingly
.PARAMETER Wait
If $true, waits for all uploads to complete and shows progress around the total upload
.PARAMETER RetryCount
How many times uploads should be retried when using the -Wait parameter
Defaults to 10
.PARAMETER ThrottleLimit
The limit of files to upload per batch while waiting
.PARAMETER User
The email or unique Id of the user to upload the files for
.EXAMPLE
Start-GSDriveFileUpload -Path "C:\Scripts","C:\Modules" -Recurse -Wait
Expand Down Expand Up @@ -107,6 +107,7 @@ function Start-GSDriveFileUpload {
if ($details.PSIsContainer) {
$newFolPerms = @{
Name = $details.Name
User = $User
Type = 'DriveFolder'
Verbose = $false
}
Expand All @@ -125,6 +126,7 @@ function Start-GSDriveFileUpload {
$parPath = "$(Split-Path $_.FullName -Parent)"
$newFolPerms = @{
Name = $_.Name
User = $User
Type = 'DriveFolder'
Parents = [String[]]$folIdHash[$parPath]
Verbose = $false
Expand Down Expand Up @@ -306,4 +308,4 @@ function Start-GSDriveFileUpload {
[Console]::CursorVisible = $true
}
}
}
}
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ Update-GSSheetValue Export-GSSheet

### Most recent changes

#### 2.21.2

* [Issue #136](https://github.com/scrthq/PSGSuite/issues/136)
* Fixed: `Start-GSDriveFileUpload` failing when specifying a user other than the Admin user to do the upload as.

#### 2.21.1

* [Issue #131](https://github.com/scrthq/PSGSuite/issues/131) - _Free/standard Google Account support_
Expand Down

0 comments on commit 6a13459

Please sign in to comment.