You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling UploadFileV2() with a string passed to the Content parameter, the file is incorrectly uploaded. This seems to be because old files.upload endpoint allowed text content to be passed as a POST parameter, but the new upload URL interprets the unexpected content= parameter as the start of the file content, and doesn't correctly URL-decode it.
What happened
When calling
UploadFileV2()
with a string passed to theContent
parameter, the file is incorrectly uploaded. This seems to be because oldfiles.upload
endpoint allowed text content to be passed as a POST parameter, but the new upload URL interprets the unexpectedcontent=
parameter as the start of the file content, and doesn't correctly URL-decode it.Expected behavior
Steps to reproduce
reproducible code
This seems to only be an issue with the
Content
parameter, as converting the string to aReader
fixes the problem:Versions
go version go1.20.7 darwin/arm64
v0.13.0
The text was updated successfully, but these errors were encountered: