mirror of
https://github.com/neocities/neocities.git
synced 2025-08-03 16:21:52 +02:00
stream site download zip
This commit is contained in:
parent
d16bc0bace
commit
6c4a80123c
3 changed files with 19 additions and 17 deletions
|
@ -83,8 +83,6 @@ class Site < Sequel::Model
|
|||
THUMBNAIL_RESOLUTIONS = ['210x158']
|
||||
|
||||
MAX_FILE_SIZE = 10**8 # 100 MB
|
||||
MAX_SITE_DOWNLOAD_SIZE = 200_000_000 # 200MB
|
||||
MAX_SITE_FILES_DOWNLOAD = 500
|
||||
|
||||
CLAMAV_THREAT_MATCHES = [
|
||||
/^VBS/,
|
||||
|
@ -1353,10 +1351,6 @@ class Site < Sequel::Model
|
|||
((total_space_used.to_f / maximum_space) * 100).round(1)
|
||||
end
|
||||
|
||||
def too_big_to_download?
|
||||
space_used > MAX_SITE_DOWNLOAD_SIZE || site_files_dataset.count > MAX_SITE_FILES_DOWNLOAD
|
||||
end
|
||||
|
||||
# Note: Change Stat#prune! and the nginx map compiler if you change this business logic.
|
||||
def supporter?
|
||||
owner.plan_type != 'free'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue