mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[GH-ISSUE #1273] Improve file / formData upload #425
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#425
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 @onion-yz on GitHub (Oct 15, 2020).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1273
Originally assigned to: @liyasthomas on GitHub.
When the master is selected, files cannot be uploaded, and the number of files always shows no files. Checking the network payload, it is true that no files have been sent.
When selecting the release version v1.9.9, select application/x-www-form-urlencoded or application/json, the request payload is [object FormData], and the backend receives the string "[object FormData]". After parsing with tools, the format is found to be:
**------WebKitFormBoundarytpKqpaSAK4waEBzF
Content-Disposition: form-data; name="0"; filename="aaaaa.txt"
Content-Type: text/plain
------WebKitFormBoundarytpKqpaSAK4waEBzF
Content-Disposition: form-data; name="1"; filename="bbbb.txt"
Content-Type: text/plain
------WebKitFormBoundarytpKqpaSAK4waEBzF
Content-Disposition: form-data; name="data"
{"ccc":"ccc"}
------WebKitFormBoundarytpKqpaSAK4waEBzF--**
This format does not feel right, the correct one should be:
-----------------------------7e4cf3bac0c86
Content-Disposition: form-data; name="ccc"
ccc
-----------------------------7e4cf3bac0c86
Content-Disposition: form-data; name="ddd"
ddd
-----------------------------7e4cf3bac0c86
Content-Disposition: form-data; name="0"; filename="aaaaa.txt"
Content-Type: text/plain
aaaaaa
-----------------------------7e4cf3bac0c86
Content-Disposition: form-data; name="1"; filename="bbbb.txt"
Content-Type: text/plain
aaaaaa
-----------------------------7e4cf3bac0c86--
Otherwise,I hope that the file name can be modified on the front end, otherwise the file names received by the back end are all 0,1... These default names are not convenient for back-end debugging
@liyasthomas commented on GitHub (Oct 21, 2020):
I've pushed a fix for this issue. Ability to rename files will be added ASAP.
@onion-yz commented on GitHub (Oct 22, 2020):
thx
@nelsontky commented on GitHub (Feb 15, 2021):
Any updates regarding this issue. If no I don't mind having a go at this feature!
@liyasthomas commented on GitHub (Feb 15, 2021):
@nelsontky we would love to work with you on this. Feel free to ping me on Discord or Telegram
@liyasthomas.