Skip to content

zotero-custom/attachment-proxy

 
 

Repository files navigation

attachment-proxy

This server allows viewing of attachments in online Zotero libraries. There are two types of attachments supported:

  • Single files (e.g., PDFs): Streamed directly from S3.
  • Zipped webpage snapshots: Downloaded from S3 and mounted while user is loading the webpage snapshot. After a while the ZIP file is unmounted and deleted.

Install

git clone https://github.com/zotero/attachment-proxy
cd attachment-proxy
npm install

Configure

touch .env

Add the following values (update as needed for your system):

S3_BUCKET=zotero-proxy
AWS_DEFAULT_REGION=us-east-1
AWS_ACCESS_KEY_ID=your-access-key
AWS_SECRET_ACCESS_KEY=your-secret-key
# For a local Minio instance running on port 9000
AWS_ENDPOINT_URL_S3=http://localhost:9000/

Configure HMAC secret key and S3 Bucket (and accessKeyId and secretAccessKey if not using an IAM role)

Then run:

direnv allow

Run

npm start

Test

npm test
npm run stress

About

Allows online viewing of Zotero attachments

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • JavaScript 98.1%
  • Just 1.2%
  • Other 0.7%