postFiles function implemented, server receiving undefined though