Skip to content
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

Cloud import (first iteration: OneDrive) #9150

Merged
merged 1 commit into from
Jun 7, 2023
Merged

Cloud import (first iteration: OneDrive) #9150

merged 1 commit into from
Jun 7, 2023

Conversation

JammingBen
Copy link
Contributor

@JammingBen JammingBen commented Jun 5, 2023

Description

Implements an action to import files from other clouds. The first iteration supports OneDrive. Needs owncloud/ocis#6453 for the config part.

You need to run the ocis traefik and companion containers. Companion runs at https://host.docker.internal:9200/companion which needs to be defined as companion URL in oCIS (or hard-coded in the ConfigurationManager for now).

Please contact me for secret keys if you want to test it yourself. Those need to be added as env variables of the companion container:

COMPANION_ONEDRIVE_KEY: "..."
COMPANION_ONEDRIVE_SECRET: "..."

Screenshots

image image

Related Issue

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests

To-Do

  • Basic file import
  • Translations
  • Remove "Confirm" button from modal
  • Config (?)
  • Fix unit tests
  • Disable on public pages

Follow-up

  • Folder upload (including hierarchy)
  • Conflict handling
  • Remove upload helpers and use the prepare-plugin instead
  • Docs

@update-docs
Copy link

update-docs bot commented Jun 5, 2023

Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes.

/**
* Asserts whether the modal should render a confirm button
*/
withoutButtonConfirm: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needed because we have no confirmation button in the import modal

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: This plugin is going to handle all Uppy file uploads in the future, therefore it's called HandleUpload. We will tackle this in a follow-up PR. For now, the plugin only prepares the files for the cloud import though.

@JammingBen JammingBen marked this pull request as ready for review June 6, 2023 11:28
* @param file
*/
getRelativeFilePath = (file): string | undefined => {
const relativePath = file.webkitRelativePath || (file as any).relativePath
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

types could be better ;-)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally agree! I'll tackle this in the follow up PR because it refactors the plugin by quite a lot.

volumes:
uploads:
uppy_companion_datadir:
traefik_letsencrypt:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm - with this vite and ocis/traefik don't share the same certs anymore, right?

@dschmidt
Copy link
Member

dschmidt commented Jun 6, 2023

It would be great to have documentation on how to add secrets to docker-compose

@JammingBen
Copy link
Contributor Author

It would be great to have documentation on how to add secrets to docker-compose

I added a brief comment on how to do it in the PR description 👍 For the full docs I'd rather wait until we have the extension running to put it there.

Co-authored-by: Dominik Schmidt <dev@dominik-schmidt.de>
Co-authored-by: Paul Neubauer <paulneubauer@live.de>
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 6, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug C 3 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

29.5% 29.5% Coverage
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[web] Simple Import from oneDrive
3 participants