File uploads #93
-
How can I upload a file to a Kelp program? Thanks :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@rawleyfowler I turned this into a discussion. Kelp does not contain any special code to handle file uploads. You can handle uploaded files using https://metacpan.org/pod/Plack::Request#uploads, which is available in Kelp::Request (since Kelp::Request is a subclass of Plack::Request). The (very short) mention of that in the Kelp manual is here: https://metacpan.org/dist/Kelp/view/lib/Kelp/Manual.pod#File-uploads From what I remember, Plack::Request uploads looks for files in If you find Plack::Request handling of uploads unsatisfactory, you can always handle them yourself, for example by decoding a file from base64 contained in POST body. |
Beta Was this translation helpful? Give feedback.
@rawleyfowler I turned this into a discussion.
Kelp does not contain any special code to handle file uploads. You can handle uploaded files using https://metacpan.org/pod/Plack::Request#uploads, which is available in Kelp::Request (since Kelp::Request is a subclass of Plack::Request). The (very short) mention of that in the Kelp manual is here: https://metacpan.org/dist/Kelp/view/lib/Kelp/Manual.pod#File-uploads
From what I remember, Plack::Request uploads looks for files in
multipart/form-data
forms. This should be useful: https://everything.curl.dev/http/post/multipart.htmlIf you find Plack::Request handling of uploads unsatisfactory, you can always handle them yourself, for example by…