advice on coding duplicate file delete on google drive - google-drive-api

I would like to write a duplicate file removing program, but don't see a way to compare files' binary without first downloading the file. I would like the software to run on the server and allow other people to use it as well.
Any advice on doing this is appreciated.

You first need to define "duplicate" in the context of the Google Drive file system. Eg. Do you consider them to be duplicates if the title is the same, or if the content is the same.
In either case, you'll need to fetch the metadata for each of your files, then look for duplicate title or md5sum only for non-Google documents.

Related

Why bigquery download automatically my queries when I try to export it without choosing the location?

I'm working with GCP Bigquery and Its very common for me export some queries as CSV in my local computer. The thing is that a few weeks ago the exportation name of the tables change from a format like "results-YYYYMMDD-TIME" to "bquxjob_etc etc etc". Besides, since yesterday when I export it download automatically in my download folder, without asking where I want to save it.
On the other hand, when some value is null, came the word "null" as a result. Could it be related?
I have a macbook air, I'm using Google Chrome and yes, I have the option of automatically download off.
Any idea of What is going on or how can I solve it?
Thanks! :)
There could have been changes done internally to affect the things you have mentioned.
I can confirm that the filename of the CSV is the "bquxjob_etc etc etc".csv
Downloaded CSV file is automatically be downloaded to your browsers default download location. This was added to the documentation.
If you want naming convention "results-YYYYMMDD-TIME" when downloading, you can opt to downloading the data to Google Sheets.
The data downloaded to Google Sheets does not have the word "null".
Actual Query result:
Exported Query results to sheets:
As a workaround if you want to retain the "results-yyyy-mmdd-time" naming convention and no "null" values. I suggest to export query results to Google Sheets and download the data as CSV.
You can also send a feedback to the BigQuery team about the changes made.
To send a feedback with regards to the new UI:
Open any BigQuery documentation
Click "Send feedback"
Choose "BigQuery Product feedback"
Fill up the form with your feed back

Google Drive API Retrieve Revision Difference

I am trying to get the differences between two distinct revisions of a file. I have tried both listing the "changes" and "revisions" resources provided by the API. However these resources do not seem to be having the information on the "differences" between two revisions. They simply return the specific revision's file content as the information.
The main goal here is to bypass the overhead of downloading the current state of the file and just fetching the differences (between the local version that I have) so that it can be applied to the local version of that file.
Is there any way to fetch just the differences?
Is there any way to fetch just the differences?
No.
The workaround you suggested (download both file versions, then diff them locally) is the only way available so far.

Cakephp 3 searching a plugin or a solution to read keyword into pdf file

I'm looking for a solution to use on cakephp, I have a directory that contains pdf files, inside my webapp I need to implement a search input, which takes care of finding the file that contains a certain keyword, but I haven't been able to find solutions. Can someone help me?
I had a similar problem, but could not find anything suitable.
We ended up storing the PDF in Google Drive in a dedicated account and use Google APi to do the search.
Obviously it works only if the documents have no sensitive data.

Is there any way to have private data?

I'm aware of shortcut links. Looking for behavior similar to that of a native Google doc. File exists, possibly takes up storage, can be renamed/moved/deleted, but the data inside shouldn't be modified except by the app. Possibly, defining export formats/links.
I believe the answer is a simple "no" - Google Drive is for storing user files, not protected application data or configuration data. So you could put a file to a users drive, but only the owner of the drive can control whether the file is shared or changed. So they can edit it, you can't stop them, and there's no reason to think that'll ever be a feature in the future.
To have such control you will need to store such data on your own server, or some other such storage medium.
The only other thing that you would do with only Google Drive is encrypt the configuration file you store, for instance, so it couldn't be easily edited - but that's probably just a bad idea. If you must save a configuration file to a persons drive, bury it inside an application folder and sanity check it to ensure it isn't corrupt - but don't count on a person or application never opening and editing it. If it's something a person shouldn't be able to read or change, don't save it to their drive.
As of April 2012, application data is supported: What is the Application Data folder?.
"Export format links" could be done with Custom file properties, though, I'm unsure of what kind datatypes are supported for the value beyond the example string.

How to copy permissions of one drive file to another

As i understand it a request for files.get only returns my own permissions on a file. How can i read all of them or at lest get a handle for all of the permissions to copy them to another file.
The use case would be an app which creates a related file alongside the original and wants to set the same permissions and sharing settings as the original file on the app created copy.
As you can see from previous questions, currently, this will not be possible for the restrictions you state. Sorry.
Google are aware of the importance of this feature and are working to resolve it as soon as possible.
I faced the same issue and this is the workaround I used.
1) Go to google contacts and add all the members into a custom/new group.
2) Select the file you want to share and instead of searching individuals type group label name and all the members would be automatically added.