fix global media id after media upload hook