title: How to get dynamic url of file uploaded to sharepoint using python?
body: <p>My code does following tasks on daily basis:</p>
  <ol>
  <li>Create a date folder on sharepoint.DONE</li>
  <li>Create a category folder in the date folder of sharepoint. DONE</li>
  <li>Upload a file in respective category folder. DONE</li>
  </ol>
  <p><strong>4. Find the url of file. PENDING</strong></p>
  <ol start="5">
  <li><p>Send the url on email. DONE</p>
  <pre><code> def upload_files(base_url, site, access_token, fileName, filePath, fileFolderUrl):
       try:
           fileHandle = open(filePath, 'rb')
  
           #fileFolderUrl = f'Shared Documents/Output/{subFolder}'
           requestFileUploadUrl = f&quot;{base_url}/{site}/_api/web/GetFolderByServerRelativeUrl('{fileFolderUrl}')/Files/add(url='{fileName}',overwrite=true)&quot;
  
           headers = {
              'Accept':'application/json; odata=verbose',
              'Content-Type':'application/json; odata=verbose',
              'Authorization': 'Bearer {}'.format(access_token)
          }
           uploadFileResult = requests.post(requestFileUploadUrl, headers=headers, data=fileHandle)
           if uploadFileResult.status_code == 200:
               return &quot;success&quot;
           else:
               return &quot;failure&quot;
       except Exception as e:
           print(f&quot;Error in uploading files to sharepoint:{e}&quot;)
           return &quot;error&quot;
  </code></pre>
  </li>
  </ol>
  <p>Can someone please help me understand the process to obtain the url of this file that I am required to upload in dynamically created folders on sharepoint using python3+?
  So,the structure is : SharedDocuments/Output/Today's Date/CategoryA/file.xlsx</p>