can someone explain this code to me?

params[:image]....the actual file is here correct?

If you look at the form, it's probably using a group of file fields with a name of 'image'. Get params have no concept of arrays, so this is basically posted like this:

image=FILE1&image=FILE2

Rails parses fields with names ending in into an array. So params[:image] is an array of the images from the file field.

params[:image][:uploaded_data] and is that the same as this?

Nope.

params['0'][:uploaded_data] params['1'][:uploaded_data]

etc... for multiple files?

It's an array... params[:image][0]

also, what is the purpose for images? cant one just call

Image.create(:uploaded_data => img) inside the block?

Yup. Alex was just showing an example using #each instead of #collect. #collect will return an array of the created images. With #each, you have to populate an images array manually.