uploaded media now sorted according to gallery id