Skip to content

Streaming Worker Content #1498

Closed
Closed
@abiodunakande

Description

@abiodunakande

Current cloudflare-go version

v0.87.0

Description

Currently having some issues with the worker functions on the API where a string is expected/being returned for the script content.

Could we modify the create and update params to take an interface{} rather than string to enable us to stream worker content to the api.

Use cases

Workers can be up to 10Mb in size and buffering this within my application seems wrong.

Potential cloudflare-go usage

type CreateWorkerParams struct {
        ...
	Script     interface{}
        ...
}
func (api *API) UploadWorker(....... {
    body, w := io.Pipe
    ... 
     go func() {
      api.makeRequest(....body....)
     }
     // write to body...
}

References

No response

Activity

github-actions

github-actions commented on Mar 13, 2025

@github-actions

This issue hasn't been updated in a while. If it's still reproducing, please comment to let us know. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

      Participants

      @abiodunakande

      Issue actions

        Streaming Worker Content · Issue #1498 · cloudflare/cloudflare-go