Comments (11)
Hi, we can change it to simply string
. For now you can use @ts-expect-error
to silence it.
from uppy.
BTW unless you are on the 4.0 beta version, you should still have the old types:
Are you on the beta version?
from uppy.
Hi @Murderlon - thanks for your quick reply!
I am on the latest released version so it probably is the list of types you indicate here, but that list still doesn't include PATCH.
Can I use @ts-expect-error in my code that calls this? My code is JS and not TS so I'm not sure how to add this line - is it in a comment somewhere?
from uppy.
If you're not using TS, it doesn't matter to you what the types are, you wouldn't get an error regardless of what you pass. What error are you seeing then?
from uppy.
@Murderlon There's no error - the HTTP request gets initiated but with no method set at all, which causes the server to complain that it's received a malformed request.
But in trying to get you screenshots I've now discovered that the TS version works up to version 3.6.4 so I guess it's not TS that's the problem but some other underlying cause. Here's what the request looks like using version 3.6.4:
and here's what it looks like when using 3.6.5/3.6.6 (I changed no other packages in package.json except @uppy/xhr-upload):
from uppy.
That looks like a regression indeed. I can take a look.
from uppy.
Thanks so much! A couple more datapoints from my investigation if they're helpful:
- #5074 looks like the main change between those two versions
- Even at 3.6.5, if I set the method to 'post' it does generate the request correctly (it's just the wrong request because I need 'patch' 😄 )
from uppy.
Furthermore, I've discovered that if I name the method 'PATCH'
in capitals, it works! 🎉 So maybe it's only the documentation that needs updating, as well as presumably a version bump to warn people that there's a breaking change (since it used to support lowercase).
from uppy.
I was just going to say I can confirm with a test that it works. PR welcome to update types & docs :)
from uppy.
Thanks! I don't know enough about TS to make a change to the types in the code but happy to submit a PR to update the docs.
from uppy.
IMO we should fix the regression.
from uppy.
Related Issues (20)
- Recent commit caused custom providers to break HOT 3
- Getting error in companion server while upgraded NuGet Packages HOT 4
- Tus uploader `onShouldRetry` has incorrect type signature
- upload-success not setting uploadURL correctly HOT 6
- Thumbnails from cloud companion uploaders (Google Drive, Dropbox, etc) sometimes do not display before upload HOT 1
- Dashboard briefly flashes `isDraggingOver` off while dragging over drop zone. HOT 2
- Error [ERR_MODULE_NOT_FOUND] in useUppyState.js in Vite Remix Application HOT 14
- Uploading additional batches with Transloadit is broken `allowMultipleUploadBatches: true` HOT 1
- Plugin link is broken in Readme HOT 2
- Add custom button to add bufferArray or file from external source HOT 1
- Uppy (4.1) does not work on a new Sveltekit (2.5.22) project HOT 1
- Update the Image Editor UI
- Removed the resume button for the Golden Retriever Plugin in Uppy
- Indicate that @uppy/react exports DashboardModal in the docs
- Golden Retriever documentation is incorrect. HOT 1
- UI appears stuck when pressing Import/upload button
- type ImageEditorOptions can't be imported HOT 3
- Resume/Pause functionality breaks with S3 when adding a prefix to the key HOT 3
- Webcam recordings freeze on latest Chromium HOT 1
- Consistent Companion error API HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uppy.