use uuid in file storage

This commit is contained in:
zotlabs 2018-11-22 18:39:38 -08:00
parent 8e71324514
commit 9a8d1200ec
2 changed files with 3 additions and 3 deletions

View File

@ -224,7 +224,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota, DAV\IMo
}
$filesize = 0;
$hash = random_string();
$hash = new_uuid();
$f = 'store/' . $this->auth->owner_nick . '/' . (($this->os_path) ? $this->os_path . '/' : '') . $hash;

View File

@ -739,7 +739,7 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) {
}
if(! $hash)
$hash = random_string();
$hash = new_uuid();
// Check storage limits
if($options !== 'update') {
@ -1122,7 +1122,7 @@ function attach_mkdir($channel, $observer_hash, $arr = null) {
return $ret;
}
$arr['hash'] = (($arr['hash']) ? $arr['hash'] : random_string());
$arr['hash'] = (($arr['hash']) ? $arr['hash'] : new_uuid());
// Check for duplicate name.
// Check both the filename and the hash as we will be making use of both.