Skip to content

User Rate Limits

User rate limits کنترل می‌کند regular users یا visitors هر چند وقت یک‌بار می‌توانند از homepage files upload کنند. این کار از abuse شدن public upload pages جلوگیری می‌کند.

این feature فقط homepage uploads را تحت تأثیر قرار می‌دهد. Admin uploads و uploads انجام‌شده با API Tokens محدود به user rate limits نیستند.

کجا Configure کنیم

admin panel را باز کنید و بروید به:

text
System Settings -> Security Settings -> Upload Management -> User Rate Limits

User rate limit settings

Enable کردن Rate Limits

بعد از روشن شدن Enable Rate Limits، ImgBed recent uploads را بر اساس uploader IP address track می‌کند.

Default values:

SettingDefaultDescription
Detection window1.5 hoursupload records تا چه فاصله زمانی عقب‌تر شمرده شوند.
Max file count20بیشترین تعداد files مجاز در detection window.
Single file size limit20 MBبیشترین اندازه یک file.
Total upload size limit200 MBبیشترین total upload size در detection window.

مثلاً با window برابر 1.5 hours، 20 files، 20 MB برای هر file و 200 MB total، upload از همان IP وقتی هر کدام از limits رد شود blocked خواهد شد.

Excluding File Types

Excluded upload file types جلوی upload شدن دسته‌های انتخابی file توسط regular users یا visitors را می‌گیرد.

دسته‌های موجود:

TypeDescription
Imagesjpg, png, webp, gif و image files مشابه
Videosmp4, webm, mov و video files مشابه
Audiomp3, flac, wav و audio files مشابه
Documentspdf, txt, md, docx و document files مشابه
Otherfiles خارج از دسته‌های بالا، مثل zip, rar, exe, apk

به‌صورت پیش‌فرض هیچ type انتخاب نشده، یعنی allowed است.

با click روی یک type، highlight می‌شود؛ یعنی آن type blocked است.

اگر Other انتخاب شود، visitors که zip یا rar upload می‌کنند blocked می‌شوند و پیام unsupported file type می‌بینند.

Block Messages

وقتی limit فعال شود، users پیام متناظر می‌بینند:

Too frequent upload message

ScenarioMessage Meaning
Single file too largefile خیلی بزرگ است و باید قبل از upload فشرده شود.
File type blockedاین file type پشتیبانی نمی‌شود. آن را حذف کنید و دوباره تلاش کنید.
Uploads too frequentrecent uploads بیش از حد frequent است و retry time نمایش داده می‌شود.
Total size too highrecent total upload size زیاد است و retry time نمایش داده می‌شود.

چه زمانی Enable کنیم

اگر upload homepage شما public accessible است، user rate limits را enable کنید.

دلایل رایج:

  • نگران scripted bulk uploads هستید.
  • می‌خواهید visitor uploads بزرگ را محدود کنید.
  • می‌خواهید regular users فقط images upload کنند، نه archives یا installers.
  • می‌خواهید public upload باز بماند اما resource usage کنترل شود.

اگر site فقط برای خودتان است، یا فقط administrators upload می‌کنند، می‌توانید این گزینه را disabled بگذارید.

Released as user documentation for CloudFlare ImgBed.