-
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
Issue with icon when using custom provider #1570
Comments
Hi! Could you please share some code, where is that icon you are trying to display? What’s your babel config like, we have Line 11 in 7ed10a1
|
Thanks @arturi I changed as follows and the icon renders fine
to
I'll try to see if your babel suggestion works, but the project is very large and i'm not sure if doing that would break something elsewhere. I intend to package the custom provider (its for OneDrive, i noticed that I failed to state that earlier) separately soon. Any suggestion on how I can go about it? Would I have 2 separate projects (one for client and another for companion)? |
Yeah, you’d need a separate plugin for Uppy Client (you can use excising Google Drive or Instagram as an example, as you are already doing) and a module for Companion, as described in docs here: https://uppy.io/docs/companion/#Adding-custom-providers. |
This might also be relevant to the icon issue: https://uppy.io/docs/writing-plugins/#JSX |
Hi there, did the Babel suggestion work? And did I understand correctly you have a OneDrive plugin in the works? We'd love to check it out if you think it's in an ok state to share! |
Just tried out switching to preact, as Artur suggested, works and I'm able to use JSX normally. Switching to this babel configuration in my project might not be feasible but I'm outlining what needs to be done to use it with Uppy. Step 1: Add
The OneDrive plugin is working although it is only for proof of concept and uses the following library onedrive-api and passport-js that is already integrated into our project. I'd like to share but it is currently part of our project. I have it on my agenda to package it separately and make it available to you. |
That would be amazing @serverdevil, looking forward! And thank you for sharing how you worked around this problem, I'm sure it'll help other people searching and stumbling upon this thread! |
I'm trying to build a custom provider. Have ironed out a lot of shit (mainly because the provider is not available in
purest
, so ended up plugging in passport.js that we already use) looking at how you guys implemented the Google Drive provider.My plugin icon won't show. I have the SVG code set via same way as in Google Drive provider. But there is problem rendering it. I'm sure this not a bug and something to do with my project compilation. Sorry, new to the nodejs world and JSX.
JSX doesn't seem to be compiling (I don't know how else to say this)?
NOTE: I haven't developed this custom provider in isolation and it currently sits pretty within my project code.
The text was updated successfully, but these errors were encountered: