-
Notifications
You must be signed in to change notification settings - Fork 203
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
"Store files in custom nested directories" example fails with can't patch error #619
Comments
Hi, might have to do that you are using Uppy in React incorrectly. Uppy can't be declared as a simple variable inside your component. Checkout the docs: https://uppy.io/docs/react/. |
Hi @Murderlon, thanks for the quick response. import {Dashboard} from '@uppy/react'
import Uppy from '@uppy/core'
import Tus from '@uppy/tus'
import React, {useState} from 'react'
import '@uppy/core/dist/style.min.css';
import '@uppy/dashboard/dist/style.min.css';
const endpoint = 'http://127.0.0.1:1080/uploads'
function App() {
const [uppy] = useState(() => new Uppy({
debug: true,
logger: {
debug: console.log,
info: console.info,
warn: console.warn,
error: console.error
},
}).use(Tus, {
endpoint,
}));
return (
<Dashboard
uppy={uppy}
width='100vw'
height='calc(100vh - 50px)'
proudlyDisplayPoweredByUppy={false}
/>
)
}
export default App I'm not sure if I understand the |
I'll see if I can reproduce with a test |
I know this works for Supabase, as can be seen here: Maybe that serves as inspiration in the meantime. |
I actually already wrote a test for exactly this once: tus-node-server/packages/server/test/Server.test.ts Lines 285 to 327 in a0f9da1
Maybe remove |
Removing the I will try to copy the supabase setup and see if that makes a difference. |
Supabase has a multi-tenant setup so I wouldn't exactly use that. I think your problem is that you use |
That is interesting, does that mean the tus server path has to match the express server path? |
It should yes, as can be seen from the example. |
I completely missed that. Thank you very much @Murderlon! 🙌 |
Hi I try to implement the the nested directory example,
but when I try to upload via the uppy tus service I get a can't patch error.
This is my test server:
and this is my very basic uppy setup:
Is there any think that I could do wrong that could cause the upload to fail?
The text was updated successfully, but these errors were encountered: