Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Mr-8lobby opened this issue Feb 20, 2020 · 0 comments
Open

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

Mr-8lobby opened this issue Feb 20, 2020 · 0 comments

Comments

@Mr-8lobby
Copy link

Mr-8lobby commented Feb 20, 2020

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))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant