Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Asset too large when upload a zero byte file #1400

Open
2 tasks
hidden-dimensions opened this issue May 12, 2020 · 0 comments
Open
2 tasks

Asset too large when upload a zero byte file #1400

hidden-dimensions opened this issue May 12, 2020 · 0 comments

Comments

@hidden-dimensions
Copy link
Contributor

Error occurs when calling presign upload api with a zero bytes file:

curl -sS -X POST https://***.staging.skygearapp.com/_asset/presign_upload \
  -H "x-skygear-api-key: ***" \
  -H "Authorization: Bearer ***" \
  -H "Content-Type: application/json" \
  -d '{ "access": "private",
         "headers": {
            "cache-control": "max-age=3600",
            "content-type": "image/png",
            "content-length": "0"
          }
       }'

Response

{"error":{"name":"BadRequest","reason":"AssetTooLarge","message":"asset too large","code":400}}
  • Skygear Server Date/Version: 0135aa2 as well as current staging.
  • Application Platform:
  • Is this a regression?
  • Attached logs, screenshots

Expected Results

Should allow upload zero bytes file.

Actual Results

Steps to reproduce

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

No branches or pull requests

1 participant