We’re rewarding the question askers & reputations are being recalculated! Read more.
3 added 69 characters in body
source | link

Simple answer: Yes, as you already guess, this goes into the model.

Depending on how exactly the content of the zip look, you most likely hand it to a class method of the Image model, which then unpacks and evaluates the xml an creates the database records, downloads the images or whatever needs to be done.

In the controller you should have not much more than something like: (together with whatever authentication you need to handle of course)

Image.scan( params[:image_zip] )

An alternative way would be to write a class independently if the Image model to handle this task if you don't want to get too much code into this single model.

Simple answer: Yes, as you already guess, this goes into the model.

Depending on how exactly the content of the zip look, you most likely hand it to a class method of the Image model, which then unpacks and evaluates the xml an creates the database records, downloads the images or whatever needs to be done.

In the controller you should have not much more than something like: (together with whatever authentication you need to handle of course)

Image.scan( params[:image_zip] )

Simple answer: Yes, as you already guess, this goes into the model.

Depending on how exactly the content of the zip look, you most likely hand it to a class method of the Image model, which then unpacks and evaluates the xml an creates the database records, downloads the images or whatever needs to be done.

In the controller you should have not much more than something like: (together with whatever authentication you need to handle of course)

Image.scan( params[:image_zip] )

An alternative way would be to write a class independently if the Image model to handle this task if you don't want to get too much code into this single model.

2 added 69 characters in body
source | link

Simple answer: Yes, as you already guess, this goes into the model.

Depending on how exactly the content of the zip look, you most likely hand it to a class method of the Image model, which then unpacks and evaluates the xml an creates the database records, downloads the images or whatever needs to be done.

In the controller you should have not much more than something like: (together with whatever authentication you need to handle of course)

Image.scan( params[:image_zip] )

Simple answer: Yes, as you already guess, this goes into the model.

Depending on how exactly the content of the zip look, you most likely hand it to a class method of the Image model, which then unpacks and evaluates the xml an creates the database records, downloads the images or whatever needs to be done.

In the controller you should have not much more than something like:

Image.scan( params[:image_zip] )

Simple answer: Yes, as you already guess, this goes into the model.

Depending on how exactly the content of the zip look, you most likely hand it to a class method of the Image model, which then unpacks and evaluates the xml an creates the database records, downloads the images or whatever needs to be done.

In the controller you should have not much more than something like: (together with whatever authentication you need to handle of course)

Image.scan( params[:image_zip] )
1
source | link

Simple answer: Yes, as you already guess, this goes into the model.

Depending on how exactly the content of the zip look, you most likely hand it to a class method of the Image model, which then unpacks and evaluates the xml an creates the database records, downloads the images or whatever needs to be done.

In the controller you should have not much more than something like:

Image.scan( params[:image_zip] )