Updated ciniki.gallery to use generic upload functions and object functions