curl-friendly way to upload files #43
Labels
No labels
nagonag
nagonag/ignore
bug
doc
duplicate
enhancement
help wanted
invalid
question
security
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
IUS/once#43
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
running
curl -fsS --user user:pass -F .file=@file.txt https://once.schlittermann.deto send the appropriate POST request to the once server is easy enough, however, parsing the returned HTML is not.I made it work using htmlq (❎ in Debian repos), sed, and yq (✅ in Debian repos)
The
xq(xml wrapper aroundjq) pipeline is necessary to find the last uploaded file (by using the fact that ISO format datetimes are lexicographically sortable) since it's the only way to figure out whichfoo.txtyou just uploaded, if there are multiple files with the same name.Maybe once could detect the
curluser agent and respond with a basic JSON response or maybe even just a plain download link.Suggestion:
AI attribution comment added per repository instruction for this open issue.\n\n(co)authored by ai:gpt-5-codex