1
0
Fork 0
mirror of synced 2024-06-13 16:24:47 +12:00

fix(storage): add missing chunkId param to create file abuse key

A previous PR added chunkId as an abuse key param to fix a problem where uploading multiple chunks of a file would trigger the `general_rate_limit_exceeded` error. For some reason, the parameter disappeared from the abuse key causing a regression. This PR adds the param back to fix the regression.

Reference:
* https://github.com/appwrite/appwrite/issues/7879
* https://github.com/appwrite/appwrite/pull/7154
This commit is contained in:
Steven Nguyen 2024-04-03 13:28:41 -07:00 committed by GitHub
parent 955eb297ab
commit 4a2056890d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -339,7 +339,7 @@ App::post('/v1/storage/buckets/:bucketId/files')
->label('audits.event', 'file.create')
->label('event', 'buckets.[bucketId].files.[fileId].create')
->label('audits.resource', 'file/{response.$id}')
->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}')
->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId},chunkId:{chunkId}')
->label('abuse-limit', APP_LIMIT_WRITE_RATE_DEFAULT)
->label('abuse-time', APP_LIMIT_WRITE_RATE_PERIOD_DEFAULT)
->label('sdk.auth', [APP_AUTH_TYPE_SESSION, APP_AUTH_TYPE_KEY, APP_AUTH_TYPE_JWT])