Skip to content

Commit 8ac50a8

Browse files
mawasileianjensenisme
authored andcommitted
revernt sample folder
(cherry picked from commit fb96a6d)
1 parent 24114e2 commit 8ac50a8

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

data/upload_data.ps1

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff 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
5756
Write-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'..."

data/upload_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

data/upload_data.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,9 @@ else
3333
echo "Container '$CONTAINER_NAME' already exists."
3434
fi
3535

36-
$LOCAL_FOLDER = ${LOCAL_FOLDER}/sample_data
3736
# Upload all PDF files from the current directory
3837
echo "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'..."

0 commit comments

Comments
 (0)