Skip to content
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

Support transform request properly on upload #39

Merged
merged 3 commits into from
Feb 7, 2024

Conversation

DreamlandOwO
Copy link
Contributor

@DreamlandOwO DreamlandOwO commented Feb 7, 2024

I just realize we can set request body by call uppy.setMeta(), so I grab the request body come out from requester.transformRequestParams() and stick it in, now is properly transformed before upload.

But unfortunately I don't think we can transform request method or query params, that just doesn't seems possible (or may be too expensive?). If I try set method or endpoint in XHR plugin config, nothing will happen after called uppy.upload() instead of actually starting sending files to the server. I haven't try swap XHR plugin before upload, that's kinda dumb tho.

Nvm I literally found my way to do that part. Fixing right now.

@n1crack
Copy link
Owner

n1crack commented Feb 7, 2024

nice.

@DreamlandOwO
Copy link
Contributor Author

Okay, I'm checking it

@DreamlandOwO
Copy link
Contributor Author

DreamlandOwO commented Feb 7, 2024

Alright, now will be properly transformed on upload 👌

And I don't see anything on upload, maybe is from your local dev env? My cookies list are empty.
image

@DreamlandOwO DreamlandOwO changed the title Support transform request body Support transform request properly on upload Feb 7, 2024
@n1crack
Copy link
Owner

n1crack commented Feb 7, 2024

Check the demo, it its not there too maybe its from one of my chrome extension, I don't know. I'll check it later.

@DreamlandOwO
Copy link
Contributor Author

Yea I still don't see it.. maybe

image

@n1crack
Copy link
Owner

n1crack commented Feb 7, 2024

found the reason. nvm :)

@n1crack n1crack merged commit be0f58e into n1crack:master Feb 7, 2024
@n1crack
Copy link
Owner

n1crack commented Feb 7, 2024

merged the code, and I figured from your ss that the backend of the demo was legacy code :) updated the demo as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants