File tree Expand file tree Collapse file tree 3 files changed +3
-5
lines changed
Expand file tree Collapse file tree 3 files changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -52,10 +52,9 @@ if ($ContainerExists -ne "true") {
5252 Write-Host " Container '$ContainerName ' already exists." - ForegroundColor Green
5353}
5454
55- $LocalFolder = $LocalFolder + " /sample_data"
5655# Upload all PDF files from the current directory
5756Write-Host " Uploading PDF files from '$LocalFolder ' to container '$ContainerName '..."
58- Get-ChildItem - Path $LocalFolder - Recurse - Filter * .* | ForEach-Object {
57+ Get-ChildItem - Path $LocalFolder - Recurse - Filter * .pdf | ForEach-Object {
5958 $FilePath = $_.FullName
6059 $BlobName = $FilePath.Substring ($LocalFolder.Length + 1 ) -replace ' \\' , ' /'
6160 Write-Host " Uploading '$FilePath ' as blob '$BlobName '..."
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ def upload_data_files(
5454 blob_container_client .create_container ()
5555 logger .info ("Done." )
5656
57- for file in Path (local_folder + "/sample_data" ).rglob ("*.* " ):
57+ for file in Path (local_folder ).rglob ("*.pdf " ):
5858 logger .info (f"Uploading { file } to { storage_container } ." )
5959
6060 # construct blob name from file path
Original file line number Diff line number Diff line change 3333 echo " Container '$CONTAINER_NAME ' already exists."
3434fi
3535
36- $LOCAL_FOLDER = ${LOCAL_FOLDER} /sample_data
3736# Upload all PDF files from the current directory
3837echo " Uploading PDF files from '$LOCAL_FOLDER ' to container '$CONTAINER_NAME '..."
39- for file in $( find " $LOCAL_FOLDER " -type f -name " *.* " ) ; do
38+ for file in $( find " $LOCAL_FOLDER " -type f -name " *.pdf " ) ; do
4039 # Generate a unique blob name by replacing directory separators with underscores
4140 BLOB_NAME=$( echo " $file " | sed " s|$LOCAL_FOLDER /||" | tr ' /' ' _' )
4241 echo " Uploading '$file ' as blob '$BLOB_NAME '..."
You can’t perform that action at this time.
0 commit comments