From: Patrick M. <pa...@he...> - 2003-12-03 04:57:35
|
Hello, Sorry I wasn't at Xp-NewYorkCity Monday night. I choose to be disappointed instead (I watched my favorite football team lose :-). Anyways, I made committed some changes to the Upload api. Web::Upload's aren't a SimpleDispatcher that delegates to a Tempfile anymore, and they have some new methods: anUpload.read returns the content of an uploaded file. anUpload.open{ |io| io.read ... etc.... } yields an io object so you can read io style if you want. anUpload.write_to_file( filename ) writes the contents of anUpload to filename. Also, I removed one method from the Web::Upload interface: anUpload.path I think that the actual path of an upload's tempfile (or even the fact that it is a tempfile in the first place) is an implementation detail that users shouldn't really play with. Plus, using this to move uploads seemed to cause some problems with narf wiki upload tests on Windows. Cheers, Patrick |