Yesterday I had no patience anymore when it came to uploading files to Google Drive. As you may know, I’m a video editor and I post YouTube videos to my channels and I need to backup those files to the cloud in case of a Hard Disk crash.
The issue is that sometimes, the internet connection is unstable and sometimes the power goes out which means that I need to restart the upload from the beginning. It seems, Google doesn’t want to implement Resumable Uploads in Google Drive.
Also, they say that using the desktop app is better, but the issue is that the desktop app is just to sync between your PC and Google Drive. There is no option to just upload files.
There are several third-party tools like NetDrive which I use to mount my Google Drive account and use it as if it was a Local Disk. It works to download files but I really don’t recommend it to upload files, and also, it doesn’t resumes uploads when it fails.
My solution for this problem was to code a “simple” software that would allow me to upload my files and in case of a failure or power outage, it would allow me to resume the upload from the point it was interrupted. I say “simple” because the software does looks simple, but the coding was a headache to get it working.
I’ve never worked with the Google Drive API, so it was a day of learning at the same time. I could get the upload part working but not the resume part. After taking a look at codes on the Google Drive API webpage and the API Samples on GitHub, I relied on a sample code that was made to upload to YouTube, but basically the same principle applies to Google Drive. It seems both uses the same engine to upload files, so when I implemented the YouTube code, I got the resume part to work!
Now, of course, as with every backup made, it is best to check the integrity of the files. For this purpose, I used HashCheck to test if the uploaded files were uploaded correctly (Hash Match), and they were!! I interrupted the uploads on purpose and the software would give me a “Failed…” message. I then retried the upload and it worked!! I also crashed the app on purpose, and when I launched it again, it continued the upload!! And in all of these cases, the integrity of the files matched the original file.
The result of yesterday is this:
Now, there is some more stuff to do, particularly, the next thing I’d like to implement is Batch Uploading, so that I can drag and drop files and it will upload them instead of the current one by one file upload. Other than that, the tool is very simple to use. Note that I haven’t released this tool yet, as I’m still working with it, but the fact that it works really makes me happy 😀
The tool was made using the Visual Basic .NET language, using Visual Studio 2017.
The samples used to make this tool are the following:
Yes, I really <3 (love) Visual Basic .NET