Week 10(9th August — 16th August)

Saksham Gautam
2 min readAug 16, 2023

--

Goals of this week —

  1. Make upload button and the form to take details about type of anonymization functional. Send the form data to the main python program.
  2. Set-up database to store the uploaded videos.

Progress —

  1. This week started off with our first goal. To make the form functional, I had to modify the structure of the HTML code a little. Initially I was using two forms to separately input files and the anonymization information. This is not the most optimal way because for our purpose we want that the complete information, the files and the type of anonymization, should be submitted on clicking the “Submit” button. A good option is to take the entire information using one form. Also we need to show a progress bar that can show the status of the uploaded videos.
    I have used jQuery, a JavaScript library for this purpose.
  2. Next we have to ensure that only audio/video files are being uploaded. For this purpose, I implemented a simple check on the extensions of the files uploaded. The following formats are currently being supported —
    [‘.mpg’, ‘.mp2’, ‘.mpeg’, ‘.mpe’, ‘.mpv’, ‘.mp4’, ‘.m4p’, ‘.m4v’, ‘.avi’, ‘.wmv’]
    If a user uploads a file in some other format he will see a pop-up message and will be directed again to the main page. The files will not be saved in the database.
  3. Next task was to setup a database to store the incoming files. We also need to store username and timestamp of the uploaded files along with the files.
    We are not directly storing the incoming files into the database. Instead we are storing the files in a separate folder. We are only storing the path to that folder in our database. Storing files in MySQL is not recommended.
  4. This week I also ended up testing asynchronous execution using flask-executor module. It is important to run the RHA processing asynchronously, so that the user have seamless experience. A
    Asynchronous execution is working fine and I hope we will be able to integrate RHA with the web-app.

--

--