Skip to content

Path to the file on the staging server is different between an admin user and a non-admin user #4

@jamie1911

Description

@jamie1911

For an admin, you have to include the user folder in the path; for a non-admin, they only have access to their own user folder, so that folder is not part of the path. Example:

Path when making call as admin user: /u4556780/654344/54455/0_2/Updates Report for.docx
Path when making call as API user: /305415/654344/54455/0_2/Updates Report for.docx

path_object = Path(f'u{exported_document.user_id__v}{exported_document.file}')

The path should change depending on admin/user or it should be more specifically noted.

Likely:

path_object = Path(f'u{exported_document.user_id__v}{exported_document.file}')
would work with:

path_object = Path(f'{exported_document.file}')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions