1
0
mirror of https://github.com/ascribe/onion.git synced 2025-01-07 04:04:20 +01:00
onion/js/constants/uploader_constants.js
2016-06-24 16:14:16 +02:00

49 lines
1.1 KiB
JavaScript

// Validation types
export const validationParts = {
allowedExtensions: {
images: ['png', 'jpg', 'jpeg', 'gif']
},
itemLimit: {
single: 1,
multiple: 100
},
sizeLimit: {
default: 50000000000,
thumbnail: 5000000
}
};
const { itemLimit, sizeLimit } = validationParts;
export const validationTypes = {
additionalData: {
itemLimit: itemLimit.multiple,
sizeLimit: sizeLimit.default
},
registerWork: {
itemLimit: itemLimit.single,
sizeLimit: sizeLimit.default
},
workThumbnail: {
itemLimit: itemLimit.single,
sizeLimit: sizeLimit.thumbnail
}
};
// Number of manual retries before showing a contact us screen on the uploader.
export const RETRY_ATTEMPT_TO_SHOW_CONTACT_US = 5;
// S3 settings
export const S3_ACCESS_KEY = process.env.S3_ACCESS_KEY;
export const S3_ACL = process.env.S3_ACL;
export const S3_BUCKET = process.env.S3_BUCKET;
export default {
validationParts,
validationTypes,
RETRY_ATTEMPT_TO_SHOW_CONTACT_US,
S3_ACCESS_KEY,
S3_ACL,
S3_BUCKET
};