Hi @Norman Choi,
This post is in the Nintex for Office 365 section, but based on the screenshots, it appears to be SharePoint on-premise. Is that correct?
Looking at the post, it appears that you may be missing some headers.
The headers should be:
!--scriptorstartfragment-->
-H "Authorization: Bearer {access_token}" \
-H "Accept: application/json;odata=verbose" \
-H "Content-Type: application/octet-stream" \
-H "X-RequestDigest: {FormDigestValue}" \
!--scriptorendfragment-->
The second issue may be the file.
Is this an existing file, or is it just an empty file you are creating?
Have you tested this in an API testing tool such as Postman, and if so, does it work there?