+
+
+ {getLangText('We successfully received your image and it is now being encoded.')}
+
+ {getLangText('We will be refreshing this page as soon as encoding has finished.')}
+
+ {getLangText('(You may close this page)')}
+
+
+ );
+ }
},
getFileExtensionFromUrl(url) {
-
// We want to show the file's extension as a label of the download button.
// We can however not only use `extractFileExtensionFromString` on the url for that
// as files might be saved on S3 without a file extension which leads
@@ -105,19 +122,17 @@ let MediaContainer = React.createClass({
render() {
const { content, currentUser } = this.props;
-
+ const mimetype = content.digital_work.mime;
// Pieces and editions are joined to the user by a foreign key in the database, so
// the information in content will be updated if a user updates their username.
// We also force uniqueness of usernames, so this check is safe to dtermine if the
// content was registered by the current user.
const didUserRegisterContent = currentUser && (currentUser.username === content.user_registered);
+ const thumbnail = content.thumbnail.thumbnail_sizes && content.thumbnail.thumbnail_sizes['600x600'] ? content.thumbnail.thumbnail_sizes['600x600']
+ : content.thumbnail.url_safe;
- let thumbnail = content.thumbnail.thumbnail_sizes && content.thumbnail.thumbnail_sizes['600x600'] ?
- content.thumbnail.thumbnail_sizes['600x600'] : content.thumbnail.url_safe;
- let mimetype = content.digital_work.mime;
let embed = null;
let extraData = null;
- let isEmbedDisabled = mimetype === 'video' && content.digital_work.isEncoding !== undefined && content.digital_work.isEncoding !== 100;
if (content.digital_work.encoding_urls) {
extraData = content.digital_work.encoding_urls.map(e => { return { url: e.url, type: e.label }; });
@@ -132,7 +147,7 @@ let MediaContainer = React.createClass({
}
@@ -149,10 +164,9 @@ let MediaContainer = React.createClass({
+ encodingMessage={this.getEncodingMessage()} />
-
-
- {getLangText('We successfully received your image and it is now being encoded.')}
-
- {getLangText('We will be refreshing this page as soon as encoding has finished.')}
-
- {getLangText('(You may close this page)')}
-
-
- );
+ if (encodingMessage) {
+ return encodingMessage;
} else {
let Component = resourceMap[mimetype] || Other;
let componentProps = {
thumbnail,
url,
extraData,
- encodingStatus
};
// Since the launch of the portfolio whitelabel submission,