improved functions: upload both video file and json string