Skip to content

Commit

Permalink
SharePoint testing
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdez99 committed Oct 7, 2024
1 parent 9e7c9ab commit 80d63a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/scripts/upload_to_sharepoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
# Get environment vars
url = os.getenv('host_name')
site_name = os.getenv('site_name')
upload_path = os.getenv('upload_path')
upload_path = os.getenv('upload_path').replace('%20', ' ')
client_id = os.getenv('client_id')
client_secret = os.getenv('client_secret')

# Prepare the base part of the upload_url
upload_url_base = f"https://{url}/sites/{site_name}/_api/web/getfolderbyserverrelativeurl('{urllib.parse.quote(upload_path)}')/files/add(url="
upload_url_base = f"https://{url}/_api/web/getfolderbyserverrelativeurl('/sites/{site_name}/{urllib.parse.quote(upload_path)}')/files/add(url="

# use a wildcard to upload all files in the directory
file_path = os.getenv('file_path')
Expand Down

0 comments on commit 80d63a1

Please sign in to comment.