Skip to content
This repository was archived by the owner on Aug 13, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion admin/create-user.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ echo "INSERT INTO libraries VALUES (${1}, 'user', '0000-00-00 00:00:00', 0, 1)"
echo "INSERT INTO users VALUES (${1}, ${1}, '${2}', '0000-00-00 00:00:00', '0000-00-00 00:00:00')" | $MYSQL zotero_master
echo "INSERT INTO groupUsers VALUES (1, ${1}, 'member', '0000-00-00 00:00:00', '0000-00-00 00:00:00')" | $MYSQL zotero_master
echo "INSERT INTO users VALUES (${1}, '${2}', MD5('${3}'))" | $MYSQL zotero_www
echo "INSERT INTO users_email (userID, email) VALUES (1, '${4}')" | $MYSQL zotero_www
echo "INSERT INTO users_email (userID, email) VALUES (${1}, '${4}')" | $MYSQL zotero_www
echo "INSERT INTO shardLibraries VALUES (${1}, 'user', 0, 0)" | $MYSQL zotero_shard_1

4 changes: 2 additions & 2 deletions docker/bin/create-user.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/sh

if [ -z "$1" -o -z "$2" -o -z "$3" ]; then
echo "Usage: ./create-user.sh {UID} {username} {password}"
echo "Usage: ./create-user.sh {UID} {username} {password} [email]"
exit 1
fi

sudo docker-compose exec app-zotero /var/www/zotero/admin/create-user.sh ${1} ${2} ${3}
sudo docker-compose exec app-zotero /var/www/zotero/admin/create-user.sh ${1} ${2} ${3} ${4}
5 changes: 3 additions & 2 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ services:
- SERVICES=sns,sqs,apigateway
db-zotero-minio:
image: minio/minio
build:
context: ./minio
## ignore minio customizations
# build:
# context: ./minio
environment:
- MINIO_ACCESS_KEY=zotero
- MINIO_SECRET_KEY=zoterodocker
Expand Down
8 changes: 5 additions & 3 deletions misc/init-mysql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ echo "INSERT INTO groupUsers VALUES (1, 1, 'owner', '0000-00-00 00:00:00', '0000
$MYSQL zotero_www < www.sql

echo "INSERT INTO users VALUES (1, 'admin', MD5('admin'))" | $MYSQL zotero_www
echo "INSERT INTO users_email (userID, email) VALUES (1, 'admin@zotero.org')" | $MYSQL zotero_www
echo "INSERT INTO storage_institutions (institutionID, domain, storageQuota) VALUES (1, 'zotero.org', 10000)" | $MYSQL zotero_www
echo "INSERT INTO storage_institution_email (institutionID, email) VALUES (1, 'contact@zotero.org')" | $MYSQL zotero_www
echo "INSERT INTO users_email (userID, email) VALUES (1, 'root@localhost')" | $MYSQL zotero_www
# 10000 MB quota for users with email in institution "localhost"
echo "INSERT INTO storage_institutions (institutionID, domain, storageQuota) VALUES (1, 'localhost', 10000)" | $MYSQL zotero_www
# other emails in institution "localhost"
echo "INSERT INTO storage_institution_email (institutionID, email) VALUES (1, 'root@localhost')" | $MYSQL zotero_www

# Load in shard schema
cat shard.sql | $MYSQL zotero_shard_1
Expand Down
2 changes: 1 addition & 1 deletion model/Storage.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ public static function getUploadPOSTData($item, Zotero_StorageFileInfo $info) {
. "Content-Disposition: form-data; name=\"$key\"\r\n\r\n"
. $val . "\r\n";
}
$prefix .= "--$boundary\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n";
$prefix .= "--$boundary\r\nContent-Disposition: form-data; name=\"file\"; filename=\"binary\"\r\n\r\n";

// Suffix
$suffix = "\r\n--$boundary--";
Expand Down