mirror of
				https://gitea.invidious.io/iv-org/shard-kemal.git
				synced 2024-08-15 00:53:36 +00:00 
			
		
		
		
	0.25.0
This commit is contained in:
		
							parent
							
								
									7358994e91
								
							
						
					
					
						commit
						8bfc3313e9
					
				
					 2 changed files with 26 additions and 2 deletions
				
			
		
							
								
								
									
										26
									
								
								CHANGELOG.md
									
										
									
									
									
								
							
							
						
						
									
										26
									
								
								CHANGELOG.md
									
										
									
									
									
								
							|  | @ -1,3 +1,27 @@ | |||
| # 0.25.0 (05-10-2018) | ||||
| 
 | ||||
| - 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`. | ||||
| 
 | ||||
|   ```crystal | ||||
| 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 "image1=@/Users/serdar/Downloads/kemal.png" http://localhost:3000/upload` | ||||
| 
 | ||||
| - Cache HTTP routes to increase performance :rocket: https://github.com/kemalcr/kemal/pull/493 | ||||
| 
 | ||||
| # 0.24.0 (14-08-2018) | ||||
| 
 | ||||
| - *[breaking change]* Removed `env.params.files`. You can use Crystal's built-in `HTTP::FormData.parse` instead | ||||
|  | @ -55,7 +79,7 @@ end | |||
| - Don't crash on empty path when compiled in --release. [#407](https://github.com/kemalcr/kemal/pull/407) thanks @crisward 🙏 | ||||
| - Rename `Kemal::CommonLogHandler` to `Kemal::LogHandler` and `Kemal::CommonExceptionHandler` to `Kemal::ExceptionHandler`. | ||||
| - Allow videos to be opened with correct mime type. [#406](https://github.com/kemalcr/kemal/pull/406) thanks @crisward 🙏 | ||||
| - Add webm mime type.[#413](https://github.com/kemalcr/kemal/pull/413) thanks @reindeer-cafe 🙏    | ||||
| - Add webm mime type.[#413](https://github.com/kemalcr/kemal/pull/413) thanks @reindeer-cafe 🙏 | ||||
| 
 | ||||
| 
 | ||||
| # 0.21.0 (05-09-2017) | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| name: kemal | ||||
| version: 0.24.0 | ||||
| version: 0.25.0 | ||||
| 
 | ||||
| dependencies: | ||||
|   radix: | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue