Here's what I have now:
Write-S3Object `
-BucketName "user-staging" `
-Key "app/access/partials/webapi.html" `
-File "app/access/partials/webapi.html" `
-HeaderCollection @{"Cache-Control" = "public,max-age=600"}
Write-S3Object `
-BucketName "user-staging" `
-Key "app/auth/partials/agreement_policy.html" `
-File "app/auth/partials/agreement_policy.html" `
-HeaderCollection @{"Cache-Control" = "public,max-age=600"}
I would like to publish some but not all of the files in the partials directory. To do this right now I am listing every file one by one.
I know I can use this code:
Get-ChildItem . -Recurse | Foreach-Object{
but that would list all files in the directory.
Is there some way I can put the file names in an array and do the Write-S3Object for each element of the array?