How to safely remove multi linked documents and folders from one location in google drive? - google-apps-script

We use the multi-linking of folders and documents in Google drive to share live updates with our whole team. This is very useful as each person gets access to the doc and any updates made are received in real-time.
The trouble we have is that if anyone decides to remove the multi-linked item from their home directory using the "remove" option, the content is trashed for everyone. This causes loss of data and info and is not acceptable. We do have the option of checking the location of the multi-linked item and removing it from that particular location alone. But not everyone follows this.
Is there any way we can do the settings such that the "remove" option works only on the current location for the multi-linked item? All ideas are welcome. Can we use Google App Script for this?

There is no workaround for this as of now.
However, you can file a Feature Request for this.

There is no way for you to alter how the google Drive web application works. Remove will remove it forever one.

Related

How to reset my Drive for Desktop storage?

I have a problem where I'm unable to empty my trash in Google Drive. Somehow when I empty the trash, it'll appear empty and after refresh everything is there again. The storage use/allocation doesn't also change in size.
I have tried https://developers.google.com/drive/api/v3/reference/files/emptyTrash a proposed solution here but no luck.
I am using Standard subscription of 200 GB
Since you have a Google One account, I would suggest you going to their support page Google One Help to see if they can help you with that.
UPDATE
I have found another link for Google One support where you can talk personally to a Google Expert:
https://support.google.com/googleone/answer/9269729

Is there a way to list who viewed a file (and when)?

I'm searching for a little while and I can't find what I'm looking for, so it may be a good idea to ask it here.
Is there a way to obtain, by API, for a specific file, the name of the last user (and timestamp) who accessed a file?
Goal: to write to script to know who access what on my drive.
Unfortunately, what you want cannot be achieved. The Drive Activity API is used only for retrieving the activity on the specified file. You can gather the users who have view access but not the ones who have actually viewed the file.
The action object from the Drive Activity API is represented by the action detail. For a document at the moment, the action details are the following: create, edit, move, rename, delete, restore, permissionChange, comment, dlpChange, reference, settingsChange. Therefore, taking these into account as well, you cannot see who viewed a file.
Since the option of seeing the actual viewers of a file is still a relatively new feature in the UI, the option for the API does not yet exist.
What you can do instead is to file a feature request on Issue Tracker by accessing this link here.
Reference
Drive Activity API
You can use the Drive Activity API.

How dynamic is the Box /search API?

I'm using the Box search API to try to locate files on my Box account.
I'm finding that when I move files around, even though those files are on my account on the server, when I search for them, they are not found. They were found in the original location.
Should the /search API reflect the current state of my account? Or is there some sort of caching.
This seems to especially happen with files moved to subfolders.
There is a small delay where Box has to reindex your changed files, so updates won't be seen immediately in real-time.

Moving a file into a Google Drive folder without changing its ACL

In Google Drive, when puting a file into a folder, the ACLs of the folder are added to the ACLs of the file.
Is there a way to avoid that? In my use case, a lot of user have "Can View" access on the folder, but only a subset of those will ultimately allowed to view that file. Even if we quickly follow with an ACL update request, there will be a short amount of time during which the visibility of the file is too broad for my use case.
Note that a solution involving having a short period of time during which the access is more limited that what it will ultimately be would be acceptable. Also, I am ready to use either Drive API or Document List API.
This might help
I was so happy when I found it! Unfortunately, it still cannot override file settings, in the case of a document owned by someone else than the containing folder's creator.

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.