Skip to content

fix: check force script name#425

Open
CraigMChen wants to merge 2 commits into
HumanSignal:masterfrom
CraigMChen:fix/upload-api-prefix
Open

fix: check force script name#425
CraigMChen wants to merge 2 commits into
HumanSignal:masterfrom
CraigMChen:fix/upload-api-prefix

Conversation

@CraigMChen

Copy link
Copy Markdown

According to the following code in repo label-studio

@property
def url(self):
    if settings.FORCE_SCRIPT_NAME and not (settings.HOSTNAME and settings.CLOUD_FILE_STORAGE_ENABLED):
        return settings.FORCE_SCRIPT_NAME + '/' + self.file.url.lstrip('/')
    else:
        return self.file.url

The file path is prefixed with settings.FORCE_SCRIPT_NAME if script name is not null. The SDK should consider this situation when checking whether a file is an uploaded file.

@github-actions github-actions Bot added the fix label Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant