Skip to content

How to delete a file? #39

Description

@HLFH

It seems we can only delete a directory?
If we upload a file at the same location, it does not upload it if the file is present, how to overwrite?

EDIT:
It should be documented in the README that you can delete files as well.

        encoded_location = URI::DEFAULT_PARSER.escape(location)
        @nextcloud_service.webdav.directory.destroy(encoded_location)

And that you need to encode the location for uploads as well in order for the upload to work.
And that you don't use the encoded location for the share_url method.

        encoded_location = URI::DEFAULT_PARSER.escape(location)
        @nextcloud_service.webdav.directory.upload(encoded_location, brand_file)
        share_url = @nextcloud_service.ocs_fs.create(location, 3, nil, nil).share_url

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions