How to get backup file or file conversion - google-drive-api

I had uploaded my web design files to the google drive. Those files were with extenstions .html,.css and.js, Those files had been uploaded successfully to the google drive. Today, I was trying to download those files and come to know that all files had been stored as an extension .docx. Now I don't have any other backups of my source file. I want source code of all my webdesigns. How can I get them? In file properties, its showing me file type .docx

Related

python3 when saving a file it doesn't save to same directory as the EXE pyinstaller

I have used Pyinstaller to pack my script as onedir EXE, then installed to Program Files folder. i used this line to save a json to a file:
json.dump(data, open("data_file.json",'w'))
on some computers the file saved to where EXE is which is what i want, but others save it to different locations.
so when i try to get the file using json.load it says not file found:
json.load(open("data_file.json"), encoding="utf-8")
How can i solve this issue so the script only save files to the same EXE directory?
The cause of the problem is related to writing permission on windows. so instead of writing app data to the Program Files folder which is not recommended, you need to write the data to APPDATA folder.
i have used the code posted by giuliano-oliveira and it works perfectly cross platform.
get_user_data_dir

Stop Google Drive File Stream from Immediately syncing a deleted file

I noticed that anytime a file is put into the Google Drive File Stream folder the entire file is uploaded even if it is deleted from the user's computer mid-sync. Is there a way to change that behavior? Or even stop it from uploading mid-sync? I've tried going into the cache folder (%AppData%\Local\Google\DriveFS) but had no luck finding anything there.
Thanks for the help.
Signing out did the trick for me. I got a prompt saying:
Sign out of Drive File Stream? There are 2 files (600.0GB) that have not yet been uploaded to Google Drive. If you sign out, these files, as well as files marked "Available offline," will be removed from this computer.
Only drawback is that it sounds like you may need to re-download any files that you want to be available offline.
Backstory:
I tried to upload a couple 300GB files and they (understandably) hung. I deleted the files on my computer but drive still continued trying to upload them. Every time I restarted my computer or Drive File Stream they would show up as pending or syncing.

Is there a way to check file editing is finished in google drive and way to upload the file into our custom directory on server

Actually i am working on Google drive Api(PHP) I can upload the file into drive and now I want to check that file is editing or not and if file is edited then how we can upload this file to our custom directory with api.

How to avoid file download, if the file is already present in my local with html/javascript

How to avoid file download, if the file is already present in my local.
My Code:
<
a href="file:///C:/Users/t_smrithik/Desktop/DNS.cap">DNS.cap
I do not want to download this file again. I just want to open it. The file gets downloaded to a temp folder and then the Wireshark app(app used to open cap files) loads it.
Javascript cannot access the filesystem and check for existence. The only interaction with the filesystem is with loading js files and images (png/gif/etc).
Javascript is not the task for this

Download corrupted file when export from google drive file with nsurl connection

When i export any file from google drive on ios native application with nsurlconnection or asihttp request download completed but when i have seen in simulator document folder i got corrupted file in that folder every time after download completion of file i got 60 kb of file whether i download any size file.
Please any one know how we can download files form google drive in iphone document folder?
The Google Drive SDK for iOS provides the ability to fetch file contents without using those libraries.