Stop N fertigation one month before harvest, let naturally dry the foliage before harvest, proper field curing, cutting of foliage by leaving close to an inch stalk that would close the opening after drying, store bulbs in cool and dry place with good ventilation, turning of bulbs at monthly interval, if possible.
I recommend the two answers of Pradeep Kumar and Zahid Fazal. Onion is a sensitive crop during storage to temperature and humidity as they enhance the growth of so many fungi and bacteria. You must harvest the crop carefully so as not make wounds on the skin of onion otherwise you will loose your crop as saprophytes invade it. Aspergillus niger is a dangerous fungus that invades onion during storage and its metabolites or mycotoxins which are carcinogenic to human are so lethal.