Media gallery.  js fix, max filesize, began update hook.  #896

Update hook isn't finished.