Text Area Input and Base64 Decoder
My next task would be to work on making the HTTP to upload the data in data-form instead of file form. I had the text field input integrated with my current HTTP code so I tried to upload a 350KB file with it. It turns out that the upload is not working. My supervisor then told me to change the input from text field into text area. I then looked up the internet for information on the text area. I then changed the HTML code to make the webpage have text area input instead of a text field input. I also tried to verify what information was sent through the Ethernet when I was using the text field input instead of the text area input. It turns out that the whole 350KB data was not sent over the Ethernet, only a small portion of the data is sent. While using the text area input, all the data is sent over the Ethernet and is written into the SD card.
After this feature is done, I proceed to study about the Base64 and also learn how does the Base64 decode algorithm works. I initially tried to write the decode program in a switch function but it turns out that the switch function will be so long that it will take up a lot of time. So, I tried to look up in the internet to find out a more suitable decoder algorithm and I found a website that contains a sample code for the Base64 decoder program. This is the link to the website. I then copied the code and try to get the code to work with PIC. I using the example where the word ‘TWFu’ in Base64 will be decoded into ‘Man’. After various tries, I could get the decoder to get the input ‘TWFu’, but I still couldn’t get the correct output.