1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-15 01:25:17 +01:00

updated thumbnails:

- support multiformat
- runs in celery (way faster registration!)

updated s3 url generation:
- anonymous "/DEPLOYMENT/USER_ID_MD5/PIECE_FILE_HASH/CATEGORY/FILENAME.EXT"
- refactored code

!!!!install postgres hstore extension
sudo apt-get install postgresql postgresql-contrib
sudo su - postgres
psql mysite_db -c 'create extension hstore;'
./manage.py migrate
This commit is contained in:
diminator 2015-07-21 15:52:58 +02:00
parent 11fb512763
commit e7d85d6eb8
4 changed files with 9 additions and 2 deletions

View File

@ -155,7 +155,7 @@ let AccordionListItem = React.createClass({
<div className="col-xs-4 col-sm-3 col-md-2 col-lg-2 clear-paddings">
<div className="thumbnail-wrapper">
<Link {...linkData}>
<img src={this.props.content.thumbnail}/>
<img src={this.props.content.thumbnail.url_safe}/>
</Link>
</div>
</div>

View File

@ -27,6 +27,11 @@ let EditionContainer = React.createClass({
let timerId = window.setInterval(() => EditionActions.fetchOne(this.props.params.editionId), 10000);
this.setState({timerId: timerId});
}
let thumbnail = state.edition.thumbnail;
if (state.edition.digital_work.mime === 'image' && typeof isEncoding === 'number' && isEncoding !== 100 && !this.state.timerId) {
let timerId = window.setInterval(() => EditionActions.fetchOne(this.props.params.editionId), 10000);
this.setState({timerId: timerId});
}
},
componentDidMount() {

View File

@ -18,7 +18,8 @@ let MediaContainer = React.createClass({
},
render() {
let thumbnail = this.props.content.thumbnail;
let thumbnail = this.props.content.thumbnail.thumbnail_sizes && this.props.content.thumbnail.thumbnail_sizes['600x600'] ?
this.props.content.thumbnail.thumbnail_sizes['600x600'] : this.props.content.thumbnail.url_safe;
let mimetype = this.props.content.digital_work.mime;
let embed = null;
let extraData = null;

View File

@ -32,6 +32,7 @@ $ascribe-accordion-list-font: 'Source Sans Pro';
height: 110px;
padding:0;
cursor: pointer;
text-align: center;
img {
max-width: 100%;
max-height: 100%;