Bug #21920 ยป 13167.diff
typo3/js/flashupload.js (working copy) | ||
---|---|---|
TYPO3.FileUploadWindow = Ext.extend(Ext.Window, {
|
||
completedUploads: 0, // number of successfully completed uploads in this current instance, could be useful for some applications
|
||
activeUploads: {}, // holds all TYPO3.FileUpload instances currently uploading or in queue
|
||
lastError: null, // last error occured
|
||
swf: null, // holds the SWFUpload instance
|
||
deniedFileTypes: '', // internal, local check to see if the uploading file is not allowed
|
||
swfDefaultConfig: { // includes all default options the SWFUpload needs
|
||
... | ... | |
// private
|
||
uploadError: function(fileObj, errorCode, message) {
|
||
this.activeUploads[fileObj.id].error(errorCode, message);
|
||
this.lastError = {'errorCode': errorCode, 'message': message};
|
||
this.fireEvent('uploadError', this, [this.activeUploads[fileObj.id], errorCode, message]);
|
||
delete this.activeUploads[fileObj.id];
|
||
},
|
||
... | ... | |
totalComplete: function() {
|
||
if (this.completedUploads > 0) {
|
||
this.fireEvent('totalComplete', this);
|
||
} else {
|
||
// if all our uploads fail, we try to provide some reasons
|
||
this.totalError();
|
||
}
|
||
this.cleanup();
|
||
this.hide();
|
||
},
|
||
// private
|
||
// this handler is only called by totalComplete, not by swfupload itself
|
||
totalError: function() {
|
||
var errorCode = this.lastError.errorCode;
|
||
var message = this.lastError.message;
|
||
var messageText = null;
|
||
// provide a more detailed problem description for the well known bugs
|
||
switch (errorCode) {
|
||
case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:
|
||
if (message == '401') {
|
||
messageText = String.format(TYPO3.LLL.fileUpload.allError401);
|
||
}
|
||
break;
|
||
case SWFUpload.UPLOAD_ERROR.IO_ERROR:
|
||
if (message == 'Error #2038') {
|
||
messageText = String.format(TYPO3.LLL.fileUpload.allError2038);
|
||
}
|
||
break;
|
||
}
|
||
Ext.MessageBox.show({
|
||
title: String.format(TYPO3.LLL.fileUpload.allErrorMessageTitle),
|
||
msg: String.format(TYPO3.LLL.fileUpload.allErrorMessageText + (messageText ? messageText : message)),
|
||
buttons: Ext.MessageBox.OK,
|
||
icon: Ext.MessageBox.ERROR
|
||
});
|
||
},
|
||
|
||
/**
|
||
* Removes all components from this container.
|
||
... | ... | |
break;
|
||
case SWFUpload.UPLOAD_ERROR.HTTP_ERROR:
|
||
txt = String.format(TYPO3.LLL.fileUpload.errorUploadHttp);
|
||
txt = String.format(TYPO3.LLL.fileUpload.errorUploadHTTP, message);
|
||
break;
|
||
case SWFUpload.UPLOAD_ERROR.MISSING_UPLOAD_URL:
|
||
txt = String.format(TYPO3.LLL.fileUpload.errorUploadMissingUrl);
|
typo3/backend.php (working copy) | ||
---|---|---|
'errorQueueFileSizeLimit' => $GLOBALS['LANG']->getLL('fileUpload_errorQueueFileSizeLimit'),
|
||
'errorQueueZeroByteFile' => $GLOBALS['LANG']->getLL('fileUpload_errorQueueZeroByteFile'),
|
||
'errorQueueInvalidFiletype' => $GLOBALS['LANG']->getLL('fileUpload_errorQueueInvalidFiletype'),
|
||
'errorUploadHttp' => $GLOBALS['LANG']->getLL('fileUpload_errorUploadHttp'),
|
||
'errorUploadHTTP' => $GLOBALS['LANG']->getLL('fileUpload_errorUploadHTTP'),
|
||
'errorUploadMissingUrl' => $GLOBALS['LANG']->getLL('fileUpload_errorUploadMissingUrl'),
|
||
'errorUploadIO' => $GLOBALS['LANG']->getLL('fileUpload_errorUploadIO'),
|
||
'errorUploadSecurityError' => $GLOBALS['LANG']->getLL('fileUpload_errorUploadSecurityError'),
|
||
... | ... | |
'errorUploadFileValidation' => $GLOBALS['LANG']->getLL('fileUpload_errorUploadFileValidation'),
|
||
'errorUploadFileCancelled' => $GLOBALS['LANG']->getLL('fileUpload_errorUploadFileCancelled'),
|
||
'errorUploadStopped' => $GLOBALS['LANG']->getLL('fileUpload_errorUploadStopped'),
|
||
'allErrorMessageTitle' => $GLOBALS['LANG']->getLL('fileUpload_allErrorMessageTitle'),
|
||
'allErrorMessageText' => $GLOBALS['LANG']->getLL('fileUpload_allErrorMessageText'),
|
||
'allError401' => $GLOBALS['LANG']->getLL('fileUpload_allError401'),
|
||
'allError2038' => $GLOBALS['LANG']->getLL('fileUpload_allError2038'),
|
||
);
|
||
// Convert labels/settings back to UTF-8 since json_encode() only works with UTF-8:
|
typo3/sysext/lang/locallang_misc.xml (working copy) | ||
---|---|---|
<label index="fileUpload_errorQueueFileSizeLimit">{0} is too big</label>
|
||
<label index="fileUpload_errorQueueZeroByteFile">{0} is empty</label>
|
||
<label index="fileUpload_errorQueueInvalidFiletype">Filetype not allowed for {0}</label>
|
||
<label index="fileUpload_errorUploadHttp">Too many files selected</label>
|
||
<label index="fileUpload_errorUploadHTTP">HTTP Error occured: {0}</label>
|
||
<label index="fileUpload_errorUploadMissingUrl">Internal error: No Upload URL set</label>
|
||
<label index="fileUpload_errorUploadIO">Internal error: Problems while reading/writing the file</label>
|
||
<label index="fileUpload_errorUploadSecurityError">Internal error: {0}</label>
|
||
... | ... | |
<label index="fileUpload_errorUploadFileValidation">Internal error while validating the file</label>
|
||
<label index="fileUpload_errorUploadFileCancelled">Upload of {0} canceled</label>
|
||
<label index="fileUpload_errorUploadStopped">Upload of {0} stopped</label>
|
||
<label index="fileUpload_allErrorMessageTitle">All uploads failed</label>
|
||
<label index="fileUpload_allErrorMessageText"><![CDATA[All your uploads failed.<br /><br />If this problem persists, please try another browser, contact your administrator or disable this "Flash Uploader" in your User settings.<br /><br />Problem description:<br />]]></label>
|
||
<label index="fileUpload_allError401">The server returned a status code 401, so it seems like you use .htaccess password protection. Unfortunately this can not be handled by your browser's Flash plugin.</label>
|
||
<label index="fileUpload_allError2038">An input/output error occured (Error #2038). This i.e. happens with servers using a self-signed SSL certificate, which is a limitation of the Flash plugin.</label>
|
||
</languageKey>
|
||
</data>
|
||
</T3locallang>
|