-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add @uppy/webdav #5551
Merged
Merged
Add @uppy/webdav #5551
Conversation
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
Co-authored-by: Mikael Finstad <[email protected]>
Diff output filesdiff --git a/packages/@uppy/companion/lib/server/controllers/get.js b/packages/@uppy/companion/lib/server/controllers/get.js
index 44c2d07..f69f049 100644
--- a/packages/@uppy/companion/lib/server/controllers/get.js
+++ b/packages/@uppy/companion/lib/server/controllers/get.js
@@ -8,7 +8,7 @@ async function get(req, res) {
const { accessToken } = providerUserSession;
const { provider } = req.companion;
async function getSize() {
- return provider.size({ id, token: accessToken, query: req.query });
+ return provider.size({ id, token: accessToken, providerUserSession, query: req.query });
}
const download = () => provider.download({ id, token: accessToken, providerUserSession, query: req.query });
try {
diff --git a/packages/@uppy/companion/lib/server/provider/index.js b/packages/@uppy/companion/lib/server/provider/index.js
index 12e8acb..af96424 100644
--- a/packages/@uppy/companion/lib/server/provider/index.js
+++ b/packages/@uppy/companion/lib/server/provider/index.js
@@ -11,6 +11,7 @@ const instagram = require("./instagram/graph");
const facebook = require("./facebook");
const onedrive = require("./onedrive");
const unsplash = require("./unsplash");
+const webdav = require("./webdav");
const zoom = require("./zoom");
const { getURLBuilder } = require("../helpers/utils");
const logger = require("../logger");
@@ -65,7 +66,7 @@ module.exports.getProviderMiddleware = (providers, grantConfig) => {
* @returns {Record<string, typeof Provider>}
*/
module.exports.getDefaultProviders = () => {
- const providers = { dropbox, box, drive: Drive, googlephotos, facebook, onedrive, zoom, instagram, unsplash };
+ const providers = { dropbox, box, drive: Drive, googlephotos, facebook, onedrive, zoom, instagram, unsplash, webdav };
return providers;
};
/**
diff --git a/packages/@uppy/locales/lib/en_US.js b/packages/@uppy/locales/lib/en_US.js
index 73ee7bc..e35a04f 100644
--- a/packages/@uppy/locales/lib/en_US.js
+++ b/packages/@uppy/locales/lib/en_US.js
@@ -28,6 +28,7 @@ en_US.strings = {
aspectRatioPortrait: "Crop portrait (9:16)",
aspectRatioSquare: "Crop square",
authAborted: "Authentication aborted",
+ authenticate: "Connect",
authenticateWith: "Connect to %{pluginName}",
authenticateWithTitle: "Please authenticate with %{pluginName} to select files",
back: "Back",
@@ -133,7 +134,9 @@ en_US.strings = {
pluginNameScreenCapture: "Screencast",
pluginNameUnsplash: "Unsplash",
pluginNameUrl: "Link",
+ pluginNameWebdav: "WebDAV",
pluginNameZoom: "Zoom",
+ pluginWebdavInputLabel: "WebDAV URL for a file (e.g. from ownCloud or Nextcloud)",
poweredBy: "Powered by %{uppy}",
processingXFiles: {
"0": "Processing %{smart_count} file",
diff --git a/packages/@uppy/provider-views/lib/GooglePicker/GooglePickerView.js b/packages/@uppy/provider-views/lib/GooglePicker/GooglePickerView.js
index 2348479..acaee1e 100644
--- a/packages/@uppy/provider-views/lib/GooglePicker/GooglePickerView.js
+++ b/packages/@uppy/provider-views/lib/GooglePicker/GooglePickerView.js
@@ -148,7 +148,7 @@ export default function GooglePickerView(_ref) {
pluginName: pickerType === "drive" ? uppy.i18n("pluginNameGoogleDrive") : uppy.i18n("pluginNameGooglePhotos"),
pluginIcon: pickerType === "drive" ? GoogleDriveIcon : GooglePhotosIcon,
handleAuth: showPicker,
- i18n: uppy.i18nArray,
+ i18n: uppy.i18n,
loading: loading,
});
}
diff --git a/packages/@uppy/provider-views/lib/ProviderView/AuthView.js b/packages/@uppy/provider-views/lib/ProviderView/AuthView.js
index 8e23845..264d238 100644
--- a/packages/@uppy/provider-views/lib/ProviderView/AuthView.js
+++ b/packages/@uppy/provider-views/lib/ProviderView/AuthView.js
@@ -125,17 +125,11 @@ export default function AuthView(_ref3) {
pluginName,
}),
),
- h(
- "div",
- {
- className: "uppy-Provider-authForm",
- },
- renderForm({
- pluginName,
- i18n,
- loading,
- onAuth: handleAuth,
- }),
- ),
+ renderForm({
+ pluginName,
+ i18n,
+ loading,
+ onAuth: handleAuth,
+ }),
);
}
diff --git a/packages/@uppy/provider-views/lib/ProviderView/ProviderView.js b/packages/@uppy/provider-views/lib/ProviderView/ProviderView.js
index 2e08398..4213b00 100644
--- a/packages/@uppy/provider-views/lib/ProviderView/ProviderView.js
+++ b/packages/@uppy/provider-views/lib/ProviderView/ProviderView.js
@@ -331,7 +331,7 @@ export default class ProviderView {
pluginName: this.plugin.title,
pluginIcon: pluginIcon,
handleAuth: this.handleAuth,
- i18n: this.plugin.uppy.i18nArray,
+ i18n: this.plugin.uppy.i18n,
renderForm: opts.renderAuthForm,
loading: loading,
});
diff --git a/packages/@uppy/provider-views/lib/index.js b/packages/@uppy/provider-views/lib/index.js
index 9d7cc3d..052661e 100644
--- a/packages/@uppy/provider-views/lib/index.js
+++ b/packages/@uppy/provider-views/lib/index.js
@@ -1,3 +1,4 @@
export { default as GooglePickerView } from "./GooglePicker/GooglePickerView.js";
export { default as ProviderViews, defaultPickerIcon } from "./ProviderView/index.js";
+export { default as SearchInput } from "./SearchInput.js";
export { default as SearchProviderViews } from "./SearchProviderView/index.js"; |
mifi
approved these changes
Dec 16, 2024
Oh, thanks for picking it up! <3 |
feel free to squash everything as you like |
Still need to fix the styling of the plugin and the icon before merging. |
You mean styling the form? |
@dschmidt can you double check locally if things are still working as expected? |
Works like a charm for me! |
dschmidt
reviewed
Dec 16, 2024
github-actions bot
added a commit
that referenced
this pull request
Dec 17, 2024
| Package | Version | Package | Version | | -------------------------- | ------- | -------------------------- | ------- | | @uppy/companion | 5.3.0 | @uppy/progress-bar | 4.1.0 | | @uppy/companion-client | 4.3.0 | @uppy/provider-views | 4.2.0 | | @uppy/core | 4.3.1 | @uppy/status-bar | 4.0.6 | | @uppy/google-drive-picker | 0.2.1 | @uppy/utils | 6.0.6 | | @uppy/google-photos-picker | 0.2.1 | @uppy/webdav | 0.1.0 | | @uppy/locales | 4.4.0 | uppy | 4.9.0 | - @uppy/webdav: Add @uppy/webdav (Merlijn Vos / #5551) - @uppy/google-drive-picker,@uppy/google-photos-picker,@uppy/locales: Add missing Google Picker locale entries (Merlijn Vos / #5552) - @uppy/core: bring back validateRestrictions (Merlijn Vos / #5538) - @uppy/google-drive-picker,@uppy/google-photos-picker: Fix TS generics on new Google Picker plugins (Merlijn Vos / #5550) - @uppy/locales: Add missing French locale entries (Steven SAN / #5549) - e2e,@uppy/status-bar,@uppy/utils: Companion stream upload unknown size files (Mikael Finstad / #5489)
oh wow, thank you so much for getting this over the finish line! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Superseding #5528 as I can't edit the PR