Update CHANGELOG

This commit is contained in:
Serdar Dogruyol 2018-07-04 22:04:22 +03:00
parent 4a58bc9690
commit ffaf6ff1f9

View file

@ -1,23 +1,34 @@
# Next # Next
- `env.params.files` is now an `Array(FileUpload)`. You can iterate over to access the images. - *[breaking change]* Removed `env.params.files`. You can use Crystal's built-in `HTTP::FormData.parse` instead
```ruby ```ruby
env.params.files.each do |file| post "/upload" do |env|
HTTP::FormData.parse(env.request) do |upload|
filename = file.filename
filename = file.filename if !filename.is_a?(String)
"No filename included in upload"
if !filename.is_a?(String) else
"No filename included in upload" file_path = ::File.join [Kemal.config.public_folder, "uploads/", filename]
else File.open(file_path, "w") do |f|
file_path = ::File.join [Kemal.config.public_folder, "uploads/", filename] IO.copy(file.tmpfile, f)
File.open(file_path, "w") do |f| end
IO.copy(file.tmpfile, f) "Upload OK"
end end
"Upload OK"
end end
``` ```
- *[breaking change]* From now on to access dynamic url params in a WebSocket route you have to use
```ruby
ws "/:id" do |socket, context|
id = context.ws_route_lookup.params["id"]
end
```
- *[breaking change]* Removed `_method` magic param
# 0.23.0 (17-06-2018) # 0.23.0 (17-06-2018)
- Crystal 0.25.0 support 🎉 - Crystal 0.25.0 support 🎉