aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/sharedstorage.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/sharedstorage.php')
-rw-r--r--apps/files_sharing/sharedstorage.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/apps/files_sharing/sharedstorage.php b/apps/files_sharing/sharedstorage.php
index e2147bea492..afe173ad0cc 100644
--- a/apps/files_sharing/sharedstorage.php
+++ b/apps/files_sharing/sharedstorage.php
@@ -494,11 +494,15 @@ class OC_Filestorage_Shared extends OC_Filestorage {
}
}
- public function fromUploadedFile($tmpPath, $path) {
- $source = $this->getSource($tmpPath);
- if ($source) {
- $storage = OC_Filesystem::getStorage($source);
- return $storage->fromUploadedFile($this->getInternalPath($source), $path);
+ public function fromUploadedFile($tmpFile, $path) {
+ if ($this->is_writeable($path)) {
+ $source = $this->getSource($path);
+ if ($source) {
+ $storage = OC_Filesystem::getStorage($source);
+ return $storage->fromUploadedFile($tmpFile, $this->getInternalPath($source));
+ }
+ } else {
+ return false;
}
}