uppy/examples/custom-provider
Mikael Finstad eb8a806908
fix uploadRemoteFile undefined (#4814)
* fix uploadRemoteFile undefined

for some reason, only when testing locally using VITE_COMPANION_URL=https://api2.transloadit.com/companion only
we get this error...
i'm thinking for some reason, the remote file gets serialized into state and then de-serialized again
causing remote.requestClient to be gone
so I solve it by instead storing the request clients in Uppy

fixes #4791

* fix bugs

* remove unrelated space changes

* apply suggestions

* Update Uppy.js

* fix lint

---------

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-12-12 19:51:06 +00:00
..
client fix uploadRemoteFile undefined (#4814) 2023-12-12 19:51:06 +00:00
server Custom provider fixes (#4498) 2023-06-19 15:08:21 +02:00
index.html meta: run Prettier on existing files (#4713) 2023-09-29 11:11:28 +02:00
package.json meta: upgrade to Vite 4 and ESBuild 0.16 (#4243) 2022-12-13 15:07:19 +01:00
README.md example: fix custom-provider example (#3854) 2022-07-04 14:06:36 +02:00

Uppy + Companion + Custom Provider Example

This example uses @uppy/companion with a dummy custom provider. This serves as an illustration on how integrating custom providers would work

Run it

Note: this example is using fetch, which is only available on Node.js 18+.

First, you want to set up your environment variable. You can copy the content of .env.example and save it in a file named .env. You can modify in there all the information needed for the app to work that should not be committed (Google keys, Unsplash keys, etc.).

[ -f .env ] || cp .env.example .env

To run the example, from the root directory of this repo, run the following commands:

corepack yarn install
corepack yarn build
corepack yarn workspace @uppy-example/custom-provider start