Skip to content

Double slash in web request when calling the GetFile Function #11

@Mr-8lobby

Description

@Mr-8lobby

When calling the GetFile method used in the upload command the code is written

url := fmt.Sprintf("api/v1.3/files/%s/callbacks/%s", fileid, c.ApfellID)
encfileData := c.htmlGetData(fmt.Sprintf("%s/%s", c.BaseURL, url))

Where in your initial default.go setup you have the base url ending with a /. This causes a web request to add an addition slash to your url somewebsite.com//api/v1.3/files/... causing the upload request to hang indefinitely.

Removing the / from fmt.Sprintf("%s/%s", c.BaseURL, url)) seems to have done the trick

Fixed code: fmt.Sprintf("%s%s", c.BaseURL, url))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions