                 else if photo?.binary.file?
                     type = 'file'
                 else
+                    # There is nothing to download for this photo.
                     return cb()
 
-                name = photo.title or "#{photo.id}.jpg"
+                # Get a stream  of the binary.
                 laterStream = photo.getBinary type, (err) ->
                     if err?
                         log.error "An error occured while adding a photo to

                        log.raw err
                        cb()

                laterStream.on 'ready', (stream) ->
                    archive.append stream, {name}
                    cb()


                # Start the streaming.
                archive.pipe res

                # Abort archiving process when the user aborts his request.
                res.on 'close', ->
                    archive.abort()

