-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ Webdav connector to the Twake Drive #643
Draft
rumata-feathers
wants to merge
33
commits into
main
Choose a base branch
from
webdav-express
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 32 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
61c1fdd
🌟Creating adapter implementation for the nephele server ,authenticati…
rumata-feathers b043c3c
🌟Defining copy, move, find functions for documents service
rumata-feathers b0f7a55
🌟Creating properties service
rumata-feathers ae0f0b5
🌟Creating file - resource service
rumata-feathers af92790
🐛 Add error handling
rumata-feathers ead2adf
🐛 Connect webdav service
rumata-feathers ab4fc40
🌟Implementation of MCKOL method and handling errors as instances
rumata-feathers 863f867
🌟Implementation of COPY and MOVE methods
rumata-feathers 04875fb
🌟Implementation of PUT and GET methods
rumata-feathers 441e25d
🐛Add config
rumata-feathers d787fc1
♻️ backend: change how stream size is calculated to prevent starting …
ericlinagora c01f47d
🐛 Fixed PUT method (setStream and getStream functions)
rumata-feathers 4c6d0d2
🌟 Generate device id
rumata-feathers d720b47
♻️Improved Stream uploading
rumata-feathers e8fd313
🌟Implementing locks and adding new properties handling
rumata-feathers 2620d44
🌟Implementing device handling
rumata-feathers 0dc90e0
♻️Added company information to device
rumata-feathers 325928e
♻️Updates packages and dependencies needed for webdav
rumata-feathers e73e907
♻️Clean-ups
rumata-feathers 694ec1b
♻️Adding mime-type for files
rumata-feathers bf014de
♻️Adding documentation
rumata-feathers 36857f6
✅ github actions: adding flag to load module dynamically
ericlinagora 044979b
Merge branch 'main' into webdav-express
ericlinagora 06749f6
✅ github actions: testing different quoting
ericlinagora fdd5404
♻️Prettifying
rumata-feathers 7354874
♻️Beatifying with lint
rumata-feathers 7f43084
♻️fixing tests
rumata-feathers d233eec
♻️fixed documentation
rumata-feathers 662eae8
♻️Adding testing
rumata-feathers 1b22ff3
♻ Fixing testing
rumata-feathers fc0219c
🎨🔇♻️⚰️ backend: minor cleanup (#573)
ericlinagora 4462866
🐛 backend: Adding vital routing code back, lest we get 404s (#573)
ericlinagora 41b8472
⬆️ Update of package.json files (#573)
ericlinagora File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
Documentation/docs/internal-documentation/backend-services/webdav/Adapter.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# WebDAV Adapter | ||
|
||
The Adapter component serves as the interface between the Nephele WebDAV library and Twake Drive's file system. It handles resource location, authorization, and provides methods for creating and retrieving resources. | ||
|
||
Key features: | ||
- Implements the `Adapter` interface from Nephele | ||
- Manages URL to file path conversion | ||
- Handles authorization checks | ||
- Creates and retrieves `ResourceService` instances | ||
|
||
For implementation details, refer to `Adapter.ts`. |
10 changes: 10 additions & 0 deletions
10
Documentation/docs/internal-documentation/backend-services/webdav/DriveLock.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# DriveLock | ||
|
||
The DriveLock component implements locking mechanisms for WebDAV resources in Twake Drive. | ||
|
||
Key features: | ||
- Creation and management of exclusive and shared locks | ||
- Lock timeout handling | ||
- Integration with Twake Drive's file structure for lock storage | ||
|
||
For implementation details, refer to `DriveLock.ts`. |
10 changes: 10 additions & 0 deletions
10
...tation/docs/internal-documentation/backend-services/webdav/PropertiesService.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# PropertiesService | ||
|
||
The PropertiesService manages WebDAV properties for resources in Twake Drive's file system. | ||
|
||
Key features: | ||
- Retrieval of standard WebDAV properties (e.g., creationdate, displayname, getcontentlength) | ||
- Custom property management | ||
- Property listing and modification | ||
|
||
For implementation details, refer to `Properties.ts`. |
59 changes: 59 additions & 0 deletions
59
Documentation/docs/internal-documentation/backend-services/webdav/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# WebDAV Service for TDrive | ||
|
||
This document provides an overview of the WebDAV service implementation for Twake Drive, which allows users to access and manipulate their files using the WebDAV protocol. | ||
|
||
## Table of Contents | ||
|
||
1. [Overview](#overview) | ||
2. [Components](#components) | ||
3. [Setup and Configuration](#setup-and-configuration) | ||
4. [Usage](#usage) | ||
5. [Authentication](#authentication) | ||
6. [Limitations and Considerations](#limitations-and-considerations) | ||
|
||
## Overview | ||
|
||
The WebDAV service is implemented using the Nephele library and integrates with Twake Drive's existing file storage and permission system. It provides standard WebDAV functionality, including file operations (read, write, delete), directory listings, and locking mechanisms. | ||
|
||
## Components | ||
|
||
The WebDAV service consists of several key components: | ||
|
||
1. [Adapter](Adapter.md): Interfaces between Nephele and Twake Drive's file system. | ||
2. [ResourceService](ResourceService.md): Implements the Resource interface, handling file and directory operations. | ||
3. [PropertiesService](PropertiesService.md): Manages WebDAV properties for resources. | ||
4. [DriveLock](DriveLock.md): Implements locking mechanisms for WebDAV resources. | ||
|
||
## Setup and Configuration | ||
|
||
To set up the WebDAV service: | ||
|
||
1. Ensure all dependencies are installed. | ||
2. Configure the `routes.ts` file to set up the WebDAV endpoint (default: `internal/services/webdav/v1/webdav`). | ||
|
||
## Usage | ||
|
||
Once set up, users can connect to the WebDAV service using any WebDAV-compatible client. The service supports standard WebDAV operations such as: | ||
|
||
- Browsing directories | ||
- Uploading and downloading files | ||
- Creating and deleting directories | ||
- Moving and copying files/directories | ||
- Setting and retrieving file properties | ||
- Locking and unlocking resources | ||
|
||
## Authentication | ||
|
||
The service uses Basic Authentication. Users need to provide their device ID as the username and device password as the password. | ||
|
||
Example: | ||
``` | ||
Authorization: Basic base64(device_id:device_password) | ||
``` | ||
|
||
## Limitations and Considerations | ||
|
||
- Locks are stored within the DriveFile object to maintain database compatibility. | ||
- Performance may vary depending on the size and number of files being accessed. | ||
|
||
For more detailed information on each component, please refer to their respective documentation files. |
12 changes: 12 additions & 0 deletions
12
...entation/docs/internal-documentation/backend-services/webdav/ResourceService.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# ResourceService | ||
|
||
The ResourceService implements the `Resource` interface from Nephele, providing methods for file and directory operations within Twake Drive's file system. | ||
|
||
Key features: | ||
- File and directory CRUD operations | ||
- Stream handling for file content | ||
- Lock management | ||
- Property management | ||
- Internal member (child resource) handling | ||
|
||
For implementation details, refer to `fileResource.ts`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -237,6 +237,7 @@ | |
"documents", | ||
"applications", | ||
"applications-api", | ||
"tags" | ||
"tags", | ||
"webdav" | ||
] | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still needed after the
eval
evil hack ?