kemal v0.25.0 Release Notes

Release Date: 2018-11-04 // about 3 years ago

    ๐Ÿ‘ Crystal 0.27.0 support.

    [breaking change] Added back env.params.files.

    Here's a fully working sample for reading a image file upload image1 and saving it under public/uploads.

    post "/upload" do |env| file = env.params.files["image1"].tmpfile file\_path = ::File.join [Kemal.config.public\_folder, "uploads/", file.filename]File.open(file\_path, "w") do |f| IO.copy(file, f)end"Upload ok"end
    

    โœ… To test

    curl -F "[email protected]/Users/serdar/Downloads/kemal.png" http://localhost:3000/upload

    • ๐ŸŽ Cache HTTP routes to increase performance ๐Ÿš€ #493