Join the Webstudio community

Updated 2 months ago

The maximum number of assets per project is 50.

At a glance
Hi,

I have deployed webstudio locally with VsCode (https://docs.webstudio.is/contributing/contributing-for-developers#running-the-webstudio-project-using-vs-code).

I seem to have reached the maximum asset limit (which I find quite low).

Error message:
Plain Text
The maximum number of assets per project is 50.


Is there a way to increase this limit?
M
O
6 comments
I have solved my issue by modifing this file /workspaces/webstudio/packages/asset-uploader/src/upload.ts

With:

Plain Text
  const MAX_ASSETS_PER_PROJECT = 200;
  const count = (uploadedCount.count ?? 0) + (uploadingCount.count ?? 0);

  if (count >= MAX_ASSETS_PER_PROJECT) {
    /**
     * Here is right to write `Max ${MAX_ASSETS_PER_PROJECT}` but see the comment below,
     * it's probable that the user can exceed the limit a little bit.
     * So it can be a little bit strange that the limit is 5 but the user already has 7.
     **/
    throw new Error(
      `The maximum number of assets per project is ${MAX_ASSETS_PER_PROJECT}.`
    );
  }


I don't know if it's the best practice but it works πŸ™‚
50 was never a default limit
ah its in the .env file by default
MAX_ASSETS_PER_PROJECT=50
no need to modify code for that, its an env setting
thanks πŸ‘Œ
Add a reply
Sign up and join the conversation on Discord