1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

Begin to add avatar to actors

This commit is contained in:
Chocobozzz 2017-12-29 19:10:13 +01:00
parent 8b0d42ee37
commit c5911fd347
No known key found for this signature in database
GPG key ID: 583A612D890159BE
41 changed files with 498 additions and 177 deletions

View file

@ -9,7 +9,7 @@ import { isTestInstance, root, sanitizeHost, sanitizeUrl } from '../helpers/core
// ---------------------------------------------------------------------------
const LAST_MIGRATION_VERSION = 145
const LAST_MIGRATION_VERSION = 150
// ---------------------------------------------------------------------------
@ -172,7 +172,10 @@ const CONSTRAINTS_FIELDS = {
ACTOR: {
PUBLIC_KEY: { min: 10, max: 5000 }, // Length
PRIVATE_KEY: { min: 10, max: 5000 }, // Length
URL: { min: 3, max: 2000 } // Length
URL: { min: 3, max: 2000 }, // Length
AVATAR: {
EXTNAME: [ '.png', '.jpeg', '.jpg' ]
}
},
VIDEO_EVENTS: {
COUNT: { min: 0 }
@ -250,6 +253,12 @@ const VIDEO_MIMETYPE_EXT = {
'video/mp4': '.mp4'
}
const AVATAR_MIMETYPE_EXT = {
'image/png': '.png',
'image/jpg': '.jpg',
'image/jpeg': '.jpg'
}
// ---------------------------------------------------------------------------
const SERVER_ACTOR_NAME = 'peertube'
@ -291,7 +300,8 @@ const STATIC_PATHS = {
PREVIEWS: '/static/previews/',
THUMBNAILS: '/static/thumbnails/',
TORRENTS: '/static/torrents/',
WEBSEED: '/static/webseed/'
WEBSEED: '/static/webseed/',
AVATARS: '/static/avatars/'
}
// Cache control
@ -376,5 +386,6 @@ export {
VIDEO_PRIVACIES,
VIDEO_LICENCES,
VIDEO_RATE_TYPES,
VIDEO_MIMETYPE_EXT
VIDEO_MIMETYPE_EXT,
AVATAR_MIMETYPE_EXT
}