ArgumentException: Buffer Too Small in UploadFileAsync Method #174
Replies: 4 comments 3 replies
-
Please provide full stack trace and example file |
Beta Was this translation helpful? Give feedback.
-
2023 中文测试中文测试文测试.docx Here is the full stack:
By the way,I find if I shorten the filename,this issue cannot happen. |
Beta Was this translation helpful? Give feedback.
-
If the file whose name includes Chinese and is uploaded successfully,it will cause garbled text. |
Beta Was this translation helpful? Give feedback.
-
Yeah this seems to be an issue with the web request uploader itself. I wonder if it helps to change the encoding of the file. |
Beta Was this translation helpful? Give feedback.
-
Bug Report
Overview
I encountered an ArgumentException related to the byte buffer's size while using the UploadFileAsync method from mApi.FilesEndpoint. The complete error message is as follows:
This issue arises when attempting to upload a .docx file containing both Chinese and English text. It appears that the buffer allocated for the encoding process is insufficient for the encoded data's size.
Steps to Reproduce
To reproduce the behavior:
Attempt to upload a .docx file that contains Chinese and English text.
Observe the ArgumentException.
Note: When uploading a .cs script file, the upload process completes successfully.
Beta Was this translation helpful? Give feedback.
All reactions