Skip to content

Allow paths as filenames in multipart/form-data requests#181

Closed
mneil wants to merge 14 commits intoform-data:masterfrom
mneil:master
Closed

Allow paths as filenames in multipart/form-data requests#181
mneil wants to merge 14 commits intoform-data:masterfrom
mneil:master

Conversation

@mneil
Copy link
Copy Markdown

@mneil mneil commented Mar 14, 2016

I was trying to use this in conjunction with loopback container service which accepts a path as a filename when connecting to S3.

Long story short, the plugin coerces the filename to the files basename — so I can't send a file path as the name like /path/to/file.png.

I tried reading through as much of https://www.ietf.org/rfc/rfc2388.txt https://tools.ietf.org/html/rfc2184 as I could and as far as I can tell the only requirements for the filename are that it is US-ASCII. I like how easy your plugin makes it to send file data as multipart/form-data but I would argue it's the application developers job to determine the logic behind properties such as the filename.

I'd hate to break this for others so maybe adding an option to use basename for now would be good?

@review-ninja
Copy link
Copy Markdown

ReviewNinja

@mneil
Copy link
Copy Markdown
Author

mneil commented Mar 15, 2016

I should have left this well enough alone. I squashed my commits down but ended up rewriting some of your history where I didn't mean to. I can close this and open another with the correct commit if you'd like. Let me know your preference for PRs

@sebdeckers
Copy link
Copy Markdown
Collaborator

sebdeckers commented Jun 12, 2017

Closing because this PR as the feature has been implemented in #355 which shipped as v2.2.0. Use the filepath option to pass subdirectory information.

@sebdeckers sebdeckers closed this Jun 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants