mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-25 16:55:59 +03:00
[GH-ISSUE #298] File/binary request body support #111
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#111
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?
Originally created by @matus-m on GitHub (Nov 13, 2019).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/298
Originally assigned to: @liyasthomas on GitHub.
First of all - thanks for the work on this cool project.
Describe the solution you'd like
In order to post file content as request body, it would be comfortable to add a simple button(next to 'raw request data', or maybe as another tab) to load file from disk to sent as request body
Describe alternatives you've considered
Its possible to specify request body by pasting in file contents, but its cumbersome for binary files.
Additional context
A nice addition would be to automatically set content-type based on file extension.
@liyasthomas commented on GitHub (Nov 13, 2019):
That's a cool suggestion! Will consider it.
@liyasthomas commented on GitHub (Nov 13, 2019):
@yntelectual Upload payload feature is now live 🎉
On
POSTrequest method, there'll be an "Upload file" icon button under right side ofContent Type. Click that to upload files (JSON, XML etc..) from PC. And just "Send"! payload will posted.Thanks for the feature suggestion. Send more 😃
@matus-m commented on GitHub (Nov 14, 2019):
Awesome! 🥇 That might have been the fastest feature request completion I have ever seen.
One remark though: When posting binary data, it is usually not practical to show the actual payload byte content in the raw input field. At least if the file is not textual(

.json|yamletc...) otherwise you get massive bloat in the UI, without much benefit to the user(try uploading a jpeg for instance), plus the whole page perf suffers.My suggestion would be to just show file name from the file upload event in the box, sth like
Binary file: my_path.jpegOr at least make the input collapsed by default if file upload was used.Thanks again and I will try to think about other suggestions :)
@liyasthomas commented on GitHub (Nov 14, 2019):
Yeah, i too had this issue. I'm working on it. Will probably fix it today itself.
@liyasthomas commented on GitHub (Nov 15, 2019):
These changes were introduced last night 🎉
POST, there's support for almost all file type :/Anyway, will figure out a workaround for that too 👍
@Roffely commented on GitHub (Dec 26, 2019):
which version will support it
@liyasthomas commented on GitHub (Dec 26, 2019):
On v2
There will be form data support too✨
@semkeijsper commented on GitHub (Feb 1, 2021):
Hello, I can only find the upload files button and that seems to use --data-binary.

How do you reference a file (or multiple files) with form-data?
Similar to this feature in Postman.
Thank you in advance
@liyasthomas commented on GitHub (Feb 1, 2021):
Referencing multiple files with a name is not implemented. We're working on this feature in current sprint. Hopefully it'll be out in couple of days.