Skip to content

Commit

Permalink
Merge pull request #542 from iterate-ch/issue/416
Browse files Browse the repository at this point in the history
Editor Versioning Preferences
  • Loading branch information
dkocher authored Jul 1, 2024
2 parents 6f0e84e + 8188695 commit 8ce872a
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 30 deletions.
Binary file modified cyberduck/_images/Editor_Preferences.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 26 additions & 2 deletions cyberduck/edit.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Edit Files
You can edit a file just as a local file in an external editor by clicking the Edit toolbar button or by choosing *File → Edit With*. The file will be downloaded to a temporary directory and opened with the preferred editor. The file will be uploaded to the server every time you choose *File → Save* in the Editor application. The file is not changed on the server if you just close the document without saving it or if the content has not changed.

## Default Editor
The default editor opened for a file is selected depending on the file type. If no application is found to handle the file type the default eidtor chosen in *Preferences* is used instead.
The default editor opened for a file is selected depending on the file type. If no application is found to handle the file type the default editor chosen in *Preferences* is used instead.

```{image} _images/Edit_With_Application.png
:alt: Edit with Application
Expand All @@ -22,13 +22,22 @@ To edit file type associations choose *Properties → General → Type of file

## Preferences

### Default Editor
Set your preferred editor in *Preferences*. Select *Always use default editor* in *Preferences → Editor* if you always want to use the default editor set regardless of the file type.

```{image} _images/Editor_Preferences.png
:alt: Editor Preferences
:width: 500px
:width: 700px
```

### Versioning

```{important}
Cyberduck [9.0](https://cyberduck.io/changelog/) or later required
```

Enable the custom versioning option in *Preferences → Editor* to store previous versions of a file. The versions can be previewed, deleted or restored in the *File → Info → Versions* tab of the *[Info](../cyberduck/info.md#versions)* window. The feature only applies for protocols without native versioning like [FTP](../protocols/ftp.md)/[SFTP](../protocols/sftp/index.md), [WebDAV](../protocols/webdav/index.md), [SMB](../protocols/smb.md), [OpenStack Swift](../protocols/openstack/index.md). The file versions are stored in a hidden folder named `.duckversions` in each folder on the mount. The versions are named with a pattern like `filename.extension → filename-20230906102017.762.extension`.

## Hidden Preferences

### Disable Upload of Temporary File on Save
Expand All @@ -37,6 +46,21 @@ A [hidden configuration option](preferences.md#hidden-configuration-options).

defaults write ch.sudo.cyberduck editor.upload.temporary false

### Exclude files from versioning

Files can be excluded from versioning by using a [hidden configuration option](preferences.md#hidden-configuration-options).

versioning.include.regex=.*

### Number of saved versions

Per default, the number of saved versions is limited to 5. The oldest version will be deleted once a new version is uploaded exceeding the limit.

The number of saved versions can be customized by using a [hidden configuration option](preferences.md#hidden-configuration-options).

versioning.limit=5


## Problems

### No External Editor Available
Expand Down
105 changes: 77 additions & 28 deletions cyberduck/info.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,17 @@ Calculate the size recursively of all contained files.

## Versions

A list of file versions can be viewed in the *Versions* tab of the Info window. The following actions are available for a selected previous version:
```{important}
Cyberduck [8.4](https://cyberduck.io/changelog/) or later required
```

A list of file versions can be viewed in the *Versions* tab of the Info window. The following actions are available for
a selected previous version:

- Revert version
- Permanently delete version
- View previous version. On macOS, this opens a *QuickLook* window. On Windows, this downloads and opens the file in the default editor.
- View previous version. On macOS, this opens a *QuickLook* window. On Windows, this downloads and opens the file in the
default editor.

The list is empty when no previous version is available.

Expand All @@ -48,26 +55,41 @@ The list is empty when no previous version is available.
:width: 600px
```

The following protocols support to view previous versions of files. Some protocols also display previous versions of files in [browser](../cyberduck/browser.md) when enabling *View → Show Hidden*.

| **Protocol** | **Revert previous version** | **Open/Quick Look previous version** | **Delete version** | **Displayed in browser with *View → Show Hidden*** |
| --- | --- | --- | --- | --- |
| **[S3](../protocols/s3/index.md)** |||||
| **[Backblaze B2](../protocols/b2.md)** |||||
| **[Google Drive](../protocols/googledrive.md)** |||||
| **[Google Storage](../protocols/googlecloudstorage.md)** |||||
| **[Microsoft OneDrive](../protocols/onedrive.md)** |||||
| **[Microsoft Sharepoint](../protocols/sharepoint.md)** |||||
| **[DRACOON](../protocols/dracoon.md)** |||||
| **[Dropbox](../protocols/dropbox.md)** |||||
The following protocols support to view previous versions of files. Some protocols also display previous versions of
files in [browser](../cyberduck/browser.md) when enabling *View → Show Hidden*.

| **Protocol** | **Revert previous version** | **Open/Quick Look previous version** | **Delete version** | **Displayed in browser with *View → Show Hidden*** |
|--------------------------------------------------------------|-----------------------------|--------------------------------------|--------------------|----------------------------------------------------|
| **[S3](../protocols/s3/index.md)** |||||
| **[Backblaze B2](../protocols/b2.md)** |||||
| **[Google Drive](../protocols/googledrive.md)** |||||
| **[Google Storage](../protocols/googlecloudstorage.md)** |||||
| **[Microsoft OneDrive](../protocols/onedrive.md)** |||||
| **[Microsoft Sharepoint](../protocols/sharepoint.md)** |||||
| **[DRACOON](../protocols/dracoon.md)** |||||
| **[Dropbox](../protocols/dropbox.md)** |||||
| **[Nextcloud & ownCloud](../protocols/webdav/nextcloud.md)** |||||
| **[FTP](../protocols/ftp.md)** |||||
| **[SFTP](../protocols/sftp/index.md)** |||||
| **[WebDAV](../protocols/webdav/index.md)** |||||
| **[SMB](../protocols/smb.md)** |||||

```{note}
Using [S3](../protocols/s3/index.md) or [Backblaze B2](../protocols/b2.md), versions will only be displayed if bucket versioning is enabled.
```

```{important}
Enable _Versioning_ in *Preferences → Editor* to view revisions of edited files for protocols with no native versioning support.
```

## UNIX Permissions

Change the permissions on a particular file or folder when connected to a [FTP](../protocols/ftp.md) or [SFTP](../protocols/sftp/index.md) server. You can also select multiple files in the browser to edit permissions. Click the checkboxes or enter the [octal notation](http://en.wikipedia.org/wiki/File_system_permissions#Symbolic_notation). The recursive options will update all files within a folder but will not change the executable bit for files if not already set when recursively updating a directory.
Change the permissions on a particular file or folder when connected to a [FTP](../protocols/ftp.md)
or [SFTP](../protocols/sftp/index.md) server. You can also select multiple files in the browser to edit permissions.
Click the checkboxes or enter
the [octal notation](http://en.wikipedia.org/wiki/File_system_permissions#Symbolic_notation). The recursive options will
update all files within a folder but will not change the executable bit for files if not already set when recursively
updating a directory.

```{image} _images/UNIX_Permissions.png
:alt: UNIX Permissions
Expand All @@ -76,7 +98,8 @@ Change the permissions on a particular file or folder when connected to a [FTP](

## Access Control List (ACL)

Edit access control list for fine grained user permissions when connected to [Amazon S3](../protocols/s3/index.md) or [Google Cloud Storage](../protocols/googlecloudstorage.md).
Edit access control list for fine grained user permissions when connected to [Amazon S3](../protocols/s3/index.md)
or [Google Cloud Storage](../protocols/googlecloudstorage.md).

- [S3 ACLs](../protocols/s3/index.md#access-control-acl)
- [Google Storage ACLs](../protocols/googlecloudstorage.md#acls)
Expand All @@ -88,25 +111,39 @@ Edit access control list for fine grained user permissions when connected to [Am

## CDN Panel

Manage [Amazon CloudFront](../protocols/cdn/cloudfront.md) and [Rackspace/Akamai](../protocols/cdn/akamai.md) distributions ([CDN](../protocols/cdn/index.md)) respectively.
Manage [Amazon CloudFront](../protocols/cdn/cloudfront.md) and [Rackspace/Akamai](../protocols/cdn/akamai.md)
distributions ([CDN](../protocols/cdn/index.md)) respectively.

### Deployment Status

Upon changing configuration parameters of a distribution configuration, the settings are not distributed immediately in the CDN. While the deployment is in progress (which can take up to 15 minutes), the status *In Progress* is displayed. The updates are fully propagated throughout the CloudFront system when the distribution's state switches from *In Progress* to *Deployed*.
Upon changing configuration parameters of a distribution configuration, the settings are not distributed immediately in
the CDN. While the deployment is in progress (which can take up to 15 minutes), the status *In Progress* is displayed.
The updates are fully propagated throughout the CloudFront system when the distribution's state switches from *In
Progress* to *Deployed*.

### CloudFront Access Logging

When this option is enabled, access logs are written to `<bucketname>/logs`. The changes to the logging configuration take effect within 12 hours. The logging option is supported for both download and streaming distributions. Choose the target bucket for access logs in the dropdown menu listing all buckets of your account. It is considered best practice to choose a different logging target for each distribution.
When this option is enabled, access logs are written to `<bucketname>/logs`. The changes to the logging configuration
take effect within 12 hours. The logging option is supported for both download and streaming distributions. Choose the
target bucket for access logs in the dropdown menu listing all buckets of your account. It is considered best practice
to choose a different logging target for each distribution.

### Origin

The source of the content where CloudFront fetches the content to be served in the edge location of the CDN. This is a [S3](../protocols/s3/index) bucket or your custom origin.
The source of the content where CloudFront fetches the content to be served in the edge location of the CDN. This is
a [S3](../protocols/s3/index) bucket or your custom origin.

### Where
The `cloudfront.net` domain assigned to your distribution. This is directing to the edge location in the CDN next to the user requesting an URL.

The `cloudfront.net` domain assigned to your distribution. This is directing to the edge location in the CDN next to the
user requesting an URL.

### CNAMEs
Enter a [CNAME](http://en.wikipedia.org/wiki/CNAME_record) (alias in the Domain Name System) for the hostname of the distribution given by CloudFront. To use multiple CNAMEs for a single distribution, the hostnames must be space delimited. The CNAME must be registered on the nameserver responsible for your domain and point to `cloudfront.net` domain assigned to your distribution.

Enter a [CNAME](http://en.wikipedia.org/wiki/CNAME_record) (alias in the Domain Name System) for the hostname of the
distribution given by CloudFront. To use multiple CNAMEs for a single distribution, the hostnames must be space
delimited. The CNAME must be registered on the nameserver responsible for your domain and point to `cloudfront.net`
domain assigned to your distribution.

Example configuration:

Expand All @@ -117,20 +154,30 @@ Example configuration:
cdn.cyberduck.ch. 1576 IN CNAME d15bfu8of7vup8.cloudfront.net.

### Index File
You can assign a default root object to your HTTP or HTTPS distribution. This default object will be served when Amazon CloudFront receives a request for the root of your distribution – i.e., your distribution’s domain name by itself.

When you define a default root object, a user request that calls the root of your distribution returns the default root object. For example, if you designate the file `index.html` as your default root object, a request for `http://d604721fxaaqy9.cloudfront.net/` returns `http://d604721fxaaqy9.cloudfront.net/index.html`.
You can assign a default root object to your HTTP or HTTPS distribution. This default object will be served when Amazon
CloudFront receives a request for the root of your distribution – i.e., your distribution’s domain name by itself.

When you define a default root object, a user request that calls the root of your distribution returns the default root
object. For example, if you designate the file `index.html` as your default root object, a request
for `http://d604721fxaaqy9.cloudfront.net/` returns `http://d604721fxaaqy9.cloudfront.net/index.html`.

### Object Invalidation
[Invalidation](http://aws.amazon.com/about-aws/whats-new/2010/08/31/cloudfront-adds-invalidation-feature/) is one way to remove a distribution object from an edge server cache before the expiration setting on the object's header. Invalidation clears the object from the edge server cache, and a subsequent request for the object will cause CloudFront to return to the origin to fetch the latest version of the object.

[Invalidation](http://aws.amazon.com/about-aws/whats-new/2010/08/31/cloudfront-adds-invalidation-feature/) is one way to
remove a distribution object from an edge server cache before the expiration setting on the object's header.
Invalidation clears the object from the edge server cache, and a subsequent request for the object will cause CloudFront
to return to the origin to fetch the latest version of the object.

```{note}
Use the Invalidate option *File → Info → Distribution (CDN)* to invalidate files from edge locations.
```

## Provider Panel

Settings specific for the cloud service in use. Available for [Amazon S3](../protocols/s3/index.md), [Backblaze B2](../protocols/b2.md), [Windows Azure Blob Storage](../protocols/azure.md), and [Google Cloud Storage](../protocols/googlecloudstorage.md).
Settings specific for the cloud service in use. Available
for [Amazon S3](../protocols/s3/index.md), [Backblaze B2](../protocols/b2.md), [Windows Azure Blob Storage](../protocols/azure.md),
and [Google Cloud Storage](../protocols/googlecloudstorage.md).

``````{tabs}
`````{group-tab} Amazon S3
Expand Down Expand Up @@ -192,9 +239,11 @@ Settings specific for the cloud service in use. Available for [Amazon S3](../pro

View and modify metadata attributes of files.

Any non-standard HTTP header values are (transparently) prefixed with the following values following the guidelines from the different providers:
Any non-standard HTTP header values are (transparently) prefixed with the following values following the guidelines from
the different providers:

- Values are prefixed with `x-amz-meta-` for [S3](../protocols/s3/index.md) and [Google Storage](../protocols/googlecloudstorage.md).
- Values are prefixed with `x-amz-meta-` for [S3](../protocols/s3/index.md)
and [Google Storage](../protocols/googlecloudstorage.md).
- Values are prefixed with `X-Object-Meta-` for [CloudFiles](../protocols/openstack/cloudfiles.md).

```{image} _images/Metadata.png
Expand Down

0 comments on commit 8ce872a

Please sign in to comment.