Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hey there,
in this GitRepo you do not have the "Issues" activated to report a potential bug so I tried to investigate myself.
For me, the
FilesService.Upload
does not work correctly.After investigating, I found out that according to the API specifications of putio the Endpoint to upload should be
https://upload.put.io/v2/files/upload
instead of justhttps://upload.put.io
. This is what the code is doing. Until now, we're using a weird placeholder$upload$
to override the hostname. I improved the logic, made clearer what is happening and added tests to theclient
I did not touch the logic of
func (u *UploadService) CreateUpload(
this uses a weird placeholder as well. I do not know where this endpoint is reflected in V2 at all, so I kept the logic as is here