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

Compatible with cloudflare worker #562

Open
HelloRickey opened this issue Aug 6, 2024 · 2 comments
Open

Compatible with cloudflare worker #562

HelloRickey opened this issue Aug 6, 2024 · 2 comments

Comments

@HelloRickey
Copy link

HelloRickey commented Aug 6, 2024

Summary

cloudflare worker is a popular serverless service. I am trying to integrate it with greenfield, but when I call delegateUploadObject to upload a file, it prompts

{
code: -1,
message: 'Browser-only version of superagent could not find XHR',
statusCode: 404
}

You can reproduce the problem by running this repository
https://github.com/HelloRickey/greenfield-cloudflare-worker-test

I sincerely recommend that Greenfield be adapted to cloudflare worker. Developers can quickly build Greenfield services without having to maintain servers, which will increase the usage of greenfield. If you can solve the problems I mentioned above, I am willing to continue to maintain greenfield-cloudflare-worker, thx.

@rrr523
Copy link
Collaborator

rrr523 commented Aug 16, 2024

What's your Nodejs version?

The delegrateUpload's test case is worked.

@HelloRickey
Copy link
Author

What's your Nodejs version?

The delegrateUpload's test case is worked.

My Nodejs version is v18.0.0

It runs fine in a normal nodejs service, but an error occurs in a cloudflare worker.
And can I send a post request directly to the greenfield node to upload resources without using the sdk?

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

No branches or pull requests

2 participants