CC-2471:error when upload a duplicate file
- fixed - Please read the comment on the ticket
This commit is contained in:
parent
8475326d96
commit
b22a6268f2
2 changed files with 4 additions and 1 deletions
|
@ -4,6 +4,9 @@ define('AIRTIME_VERSION', '1.9.0-beta2');
|
||||||
define('AIRTIME_COPYRIGHT_DATE', '2010-2011');
|
define('AIRTIME_COPYRIGHT_DATE', '2010-2011');
|
||||||
define('AIRTIME_REST_VERSION', '1.1');
|
define('AIRTIME_REST_VERSION', '1.1');
|
||||||
|
|
||||||
|
// this constant is still used in somewhere
|
||||||
|
define('UI_MDATA_KEY_TITLE', 'track_title');
|
||||||
|
|
||||||
// Metadata Keys for files
|
// Metadata Keys for files
|
||||||
define('MDATA_KEY_FILEPATH', 'filepath');
|
define('MDATA_KEY_FILEPATH', 'filepath');
|
||||||
define('MDATA_KEY_MD5', 'md5');
|
define('MDATA_KEY_MD5', 'md5');
|
||||||
|
|
|
@ -805,7 +805,7 @@ class StoredFile {
|
||||||
die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": ' . $duplicate->getMessage() .'}}');
|
die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": ' . $duplicate->getMessage() .'}}');
|
||||||
}
|
}
|
||||||
if (file_exists($duplicate->getFilePath())) {
|
if (file_exists($duplicate->getFilePath())) {
|
||||||
$duplicateName = $duplicate->getMetadataValue(UI_MDATA_KEY_TITLE);
|
$duplicateName = $duplicate->getMetadataValue("UI_MDATA_KEY_TITLE");
|
||||||
die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": "An identical audioclip named ' . $duplicateName . ' already exists in the storage server."}}');
|
die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": "An identical audioclip named ' . $duplicateName . ' already exists in the storage server."}}');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue