Bulk Assets download?

Hi, one of my users uploaded hundreds of photos in high resolution (more than 10 MB each) and I’m looking for ways to reduce those file sizes.

  • Is there a way to download a group of assets?

  • Is there a way to filter the assets by size?

  • Also, is there a way to prevent the user from uploading something big?
    AFAIK there is no way to prohibit the upload with: Rules / Asset changed / event.fileSize > X

This is for the Cloud version.

Why are you not using the dynamic resize option?

Hi, we do, but the photos are eating the space quota.

I see.

About your questions:

  1. No
  2. Yes, you can write a filter in the API, something like $filter=fileSize gt 2000000
  3. No, only when an asset is referenced.

Hi Sebastian,
the “History” of the assets also counts against the quota, right? Is there a way to limit the number of versions that it keeps? Or delete the history?

Yes and no…but I can also reset your quota

Sebastian, how does it work?

I go into the database and make a few hacks :wink:

Yes, please.

I just deleted about 300 images, and 2 odd things happened:

  • the “Assets Uploads” graph added those to yesterday uploads.
  • the quota went up from 5,9 to 6.3 GB.

I think there is no way to recover a deleted asset, so there is no point in saving its history.

It is a bug that your usage went up, I just found it and fixed it, but you can also download older assets if you replace and asset with a new version.

EDIT: What is you app name again?

Hi, the name is chiletur

I have already found it in the meantime and have reset your usage data for assets.

You have to notice 2 things:

  1. It can take a few minutes until you see it.
  2. The asset usage database is derived from the events, so if a new event like AssetUploaded is raised in the system the usage database is updated. This is called a projection. Sometimes these projections are recreated and then my change is lost and you asset quota is up again. I don’t expect that I have to do it but just in case…