After following the instructions in the documentation found here, my code still isn't functioning correctly. I made some adjustments to the script:
window.gapi.client.drive.files.get({
fileId: fileId,
fields: 'parents'
}).then(res => {
console.log(res)
window.gapi.client.drive.files.update({
fileId: this.fileData.id,
addParents: folderId,
removeParents: res.result.parents[0],
fields: 'id, parents'
}).then(res => {
console.log(res)
})
})
Now, the file is successfully moved to a new location, but it doesn't remove the file from the current location. Essentially, it's more like copying the file rather than moving it.