 
             photos.splice fileByPage, 1
             for photo in photos
+                # Sort photos by month
                 date = new Date(photo.lastModification)
                 mounth = date.getMonth() + 1
                 mounth = if mounth > 9 then "#{mounth}" else "0#{mounth}"

            return res.error 500, 'An error occured', err
        else

            if photos.length is fileByPage + 1
                hasNext = true
            else


    return next new Error('no binary') unless file.binary?

    # Create photo document
    photo =
        date         : file.lastModification
        title        : ""
