Skip to content

Check upload size limits on the client #1486

Closed

Description

@netomi

We should check in the webui if a user tries to upload an extensions that would exceed the maximum allowed content size to fail early on.

Also some browsers do not correctly display a 413 error if the request is not fully read, see #1458.

Activity

  1. netomi commented on Jun 30, 2026

    @netomi
    ContributorAuthor

    @gnugomez that would also be something useful to work on. We should tell the frontend what the maximum supported extension size is, e.g. via the existing /api/version endpoint that the frontend already fetches. If the user wants to upload an extension larger than the allowed max size, already prevent the extension from being uploaded.

    Currently, the upload happens no matter how big the extension is, and will then fail if the server reads more than allowed bytes.

  2. added
    webui(Component: webui) Front-end user interface for open-vsx.org
    javascriptPull requests that update JavaScript code
    on Jun 30, 2026
  3. gnugomez commented on Jul 2, 2026

    @gnugomez
    Member

    @netomi I'm not sure if using a dynamic value coming from the API here might be a good idea, also taking into account that this limit is not something that changes much, wouldn't it be better to consume an static constant that shares the same value as ovsx.publishing.max-content-size?

  4. netomi commented on Jul 2, 2026

    @netomi
    ContributorAuthor

    but how do you inject that value into the frontend to make it aware of the limit the server enforces?

    That is also some of the things that we might wanna change dynamically via runtime settings or make the size limit dependent on the publisher.

  5. gnugomez commented on Jul 2, 2026

    @gnugomez
    Member

    I see also since it's configurable.

    The only way to consume that statically from the frontend and make it configurable at the same time would be to add a page setting to the React app, so when you initialise the app it takes the value. But you would have to change that in both server and webui config...

    Maybe it is something that we may want to retrieve from a settings endpoint then..
    Why don't we move the GET /admin/settings out of admin?
    I guess we could add a new value to the GET /api/version return, but doesn't that defeat a bit the purpose of the endpoint itself?

  6. netomi commented on Jul 2, 2026

    @netomi
    ContributorAuthor

    /admin/settings is for admin only and this is fine.

    we could make a new endpoint /api/config that includes things relevant for the frontend, e.g. version, upload limit, ... and remove the version one though.

  7. gnugomez commented on Jul 2, 2026

    @gnugomez
    Member

    yeah, that works, are we sure to remove the /api/version one?

    For health checks we have /actuator/health. Are we sure there's no other consumer than the webui of this version?

  8. netomi commented on Jul 2, 2026

    @netomi
    ContributorAuthor

    we can add a redirect, the result currently would be extensible:

    {"version":"v1.0.2-aws"}
    
  9. added a commit that references this issue on Jul 7, 2026
    357f252
  10. added a commit that references this issue on Jul 8, 2026
    4690adc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

javascriptPull requests that update JavaScript codewebui(Component: webui) Front-end user interface for open-vsx.org

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions