Skip to content

Unable to move files or folders to the thrash with the google drive client #26399

@Timmitry

Description

@Timmitry

Is your feature request related to a problem? Please describe.

Using the google drive v3 client, I want to move a file or folder to the trash.

The general documentation states that this should be possible via a query parameter thrashed=true in the update_file endpoint.

However, the ruby client does not offer a query parameter for the update file method (or maybe I do not understand how to add it):

def update_file(file_id, file_object = nil, add_parents: nil, enforce_single_parent: nil, include_labels: nil, include_permissions_for_view: nil, keep_revision_forever: nil, ocr_language: nil, remove_parents: nil, supports_all_drives: nil, supports_team_drives: nil, use_content_as_indexable_text: nil, fields: nil, quota_user: nil, upload_source: nil, content_type: nil, options: nil, &block)

Describe the solution you'd like
I want to use the update_file method, with e.g. service.update_file("my-folder-id", supports_all_drives: true, thrashed: true, options: { retries: 3 }) or similar.

Describe alternatives you've considered

I tried to construct the query manually, by using service.send(:create_simple_command, ...) etc.
However, thrashing the file still did not work. Even though when using get_file with fields = 'capabilities, it returns true for canThrash

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions