1
0
mirror of https://github.com/etesync/server synced 2024-12-27 09:48:24 +00:00

Allow chunk UIDs to be longer.

This commit is contained in:
Tom Hacohen 2020-06-26 11:05:01 +03:00
parent 625df22989
commit 2b52eec41f
2 changed files with 20 additions and 1 deletions

View File

@ -0,0 +1,19 @@
# Generated by Django 3.0.3 on 2020-06-26 07:48
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('django_etebase', '0018_auto_20200624_0748'),
]
operations = [
migrations.AlterField(
model_name='collectionitemchunk',
name='uid',
field=models.CharField(db_index=True, max_length=60, validators=[django.core.validators.RegexValidator(message='Not a valid UID', regex='^[a-zA-Z0-9\\-_]*$')]),
),
]

View File

@ -89,7 +89,7 @@ def chunk_directory_path(instance, filename):
class CollectionItemChunk(models.Model):
uid = models.CharField(db_index=True, blank=False, null=False,
max_length=43, validators=[Base64Url256BitlValidator])
max_length=60, validators=[UidValidator])
item = models.ForeignKey(CollectionItem, related_name='chunks', on_delete=models.CASCADE)
chunkFile = models.FileField(upload_to=chunk_directory_path, max_length=150, unique=True)