Created Function to add file to array
added function to save file and post new items