Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: Can't create document via curl #443

Open
ginkel opened this issue Aug 29, 2024 · 1 comment
Open

bug: Can't create document via curl #443

ginkel opened this issue Aug 29, 2024 · 1 comment
Assignees
Labels
💥 bug Something isn't working

Comments

@ginkel
Copy link

ginkel commented Aug 29, 2024

What happened?

Hi there,

I am trying to upload a document via curl according to the docs:

curl -vF '[email protected]' https://paste.<domain>/

Unfortunately, a error is returned:

{"error":"Content: cannot be blank.","payload":{}}
{"error":"sql: no rows in result set","payload":{}}

Minimum steps to reproduce

See above

Version

spacebinorg/spirit:latest

What browsers are you seeing the problem on?

No response

Relevant log output

9:39AM DBG Request Error error="Content: cannot be blank."
9:39AM DBG Request Error error="sql: no rows in result set"
9:39AM INF HTTP Request client=172.19.0.20:39970 duration=22.503637 host=paste.<domain> method=POST page=/ protocol=HTTP/1.1 size=103 status=400 user-agent=curl/8.5.0
@ginkel ginkel added the 💥 bug Something isn't working label Aug 29, 2024
@lukewhrit lukewhrit self-assigned this Aug 31, 2024
@lukewhrit
Copy link
Owner

lukewhrit commented Aug 31, 2024

Thanks for the bug report.
Technically you're uploading a file to Spacebin instead of a plain text field. We can probably rewrite the HandleBody to support this. Until then, try curl -F content="$(cat hello.txt)" https://spaceb.in/ as a work around.

Additionally, I think we will have to reopen #434 since that is apparently not fixed.

Works:

  • curl -F content="$(cat hello.txt)" https://spaceb.in/
  • curl -F content="Hello" https://spaceb.in/

Does not work:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💥 bug Something isn't working
Projects
Status: 🐛 Bugs / QOL
Development

No branches or pull requests

2 participants