change file creating, coding to base64 now on client side