| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -55,7 +55,6 @@ $nextcloudPath = $config.Path + '/' +  $webpName
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					$uploadSplat = @{
 | 
					 | 
					 | 
					 | 
					$uploadSplat = @{
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    Authentication = 'Basic'
 | 
					 | 
					 | 
					 | 
					    Authentication = 'Basic'
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    #Credential = New-Object System.Management.Automation.PSCredential (($config.Password | ConvertFrom-SecureString -AsPlainText), (New-Object System.Security.SecureString))
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    Credential = $config.Credential
 | 
					 | 
					 | 
					 | 
					    Credential = $config.Credential
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    Method = 'Put'
 | 
					 | 
					 | 
					 | 
					    Method = 'Put'
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    Uri = '{0}/remote.php/dav/files/{1}/{2}' -f $config.BaseUrl,$config.Credential.UserName,$nextcloudPath
 | 
					 | 
					 | 
					 | 
					    Uri = '{0}/remote.php/dav/files/{1}/{2}' -f $config.BaseUrl,$config.Credential.UserName,$nextcloudPath
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -64,8 +63,8 @@ $uploadSplat = @{
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					try {
 | 
					 | 
					 | 
					 | 
					try {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    Invoke-RestMethod @uploadSplat
 | 
					 | 
					 | 
					 | 
					    Invoke-RestMethod @uploadSplat
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					} catch {
 | 
					 | 
					 | 
					 | 
					} catch {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    throw $_
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    Remove-Item $webpPath
 | 
					 | 
					 | 
					 | 
					    Remove-Item $webpPath
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    throw $_
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					$shareSplat = @{
 | 
					 | 
					 | 
					 | 
					$shareSplat = @{
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -85,11 +84,10 @@ $shareSplat = @{
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					try {
 | 
					 | 
					 | 
					 | 
					try {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    $share = Invoke-RestMethod @shareSplat
 | 
					 | 
					 | 
					 | 
					    $share = Invoke-RestMethod @shareSplat
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					} catch {
 | 
					 | 
					 | 
					 | 
					} catch {
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    throw $_
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    Remove-Item $webpPath
 | 
					 | 
					 | 
					 | 
					    Remove-Item $webpPath
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    throw $_
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					}
 | 
					 | 
					 | 
					 | 
					}
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					$share.ocs.data.url + '/preview' | wl-copy --trim-newline
 | 
					 | 
					 | 
					 | 
					$share.ocs.data.url + '/preview' | wl-copy --trim-newline
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					notify-send 'Screenshot URL in clipboard' --expire-time=1000
 | 
					 | 
					 | 
					 | 
					notify-send 'Screenshot URL in clipboard' --expire-time=1000
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					Remove-Item $webpPath
 | 
					 | 
					 | 
					 | 
					Remove-Item $webpPath
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
 
 |