Commit graph

650 commits

Author SHA1 Message Date
Julius Härtl
bfd2f39fed
Transfer shares of the transferred root node
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-09-17 19:01:48 +02:00
korelstar
10c0ed6cee fix: file quota was not applied in all cases 2020-09-17 07:13:27 +00:00
Roeland Jago Douma
af6b57cd0d Fix reading empty files from objectstorage
Since we try to do range requests this will fail hard.
However since empty files are not that interesting to read anyways we
just read from an emptry memory stream.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-09-09 19:47:30 +00:00
Julius Härtl
b3c5271c89 Properly add both mimetypes to secure mimetype mapping
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-09-09 12:17:27 +00:00
Roeland Jago Douma
f9fb6caaae
Merge pull request #22518 from nextcloud/backport/22517/stable18
[stable18] set the mount id before calling storage wrapper
2020-09-01 08:05:15 +02:00
Roeland Jago Douma
55ce30ad53 Only update the filecache entry once the file has been written to S3
If we already update before we have no way to revert if the upload
fails.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-08-31 17:08:35 +00:00
Roeland Jago Douma
f909d2a39a Don't lose filecache entry on s3 overwrite error
If the object store errors we should not always delete the filecache
entry. As this might lead to people losing access to their files.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-08-31 17:08:34 +00:00
Robin Appelman
9c7dd68238 set the mount id before calling storage wrapper
this allows the storage wrapper to use the mount id for it's own logic

Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-08-31 15:23:09 +00:00
Robin Appelman
ae6357ca6e
dont update mimetype when moving to trash
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-07-31 17:33:24 +02:00
Robin Appelman
c3f2b73a97
fix renameFromStorage messing with folder mimetype
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-07-31 17:33:17 +02:00
Robin Appelman
98ca765572
use exceptions for error signaling in writeStream
this remove the ambiguity when writing zero length files

Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-07-31 17:33:10 +02:00
Robin Appelman
7e12f9c9bb
fix moving files from external storage to object store trashbin
having the "cache rename" after the "storage move" caused the target
to get the fileid from the source file, without taking care that the object
is stored under the original file id.

By doing the "cache rename" first, we trigger the "update existing file"
logic while moving the file to the object store and the object gets stored for the
correct file id

Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-07-31 17:32:05 +02:00
Robin Appelman
cc35da4d28 ensure home storage is initialized on first setup
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-07-09 12:33:29 +00:00
Robin Appelman
a2ebe6d30e relax permissions mask check for detecting part file rename
with files drop uploads the original file name isn't always used for the '.ocTransferId' source path

Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-06-24 19:08:42 +00:00
Christoph Wurst
5fdcb5a1e3 Disable Client-Side Monitoring on AWS storage
The S3 client enables this by default and then tries to read
`.aws/config`. This causes `open_basedir` restriction related error for
some setups. So this patch disables the CSM because it's most likely
unused anyway.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-17 09:02:20 +00:00
Morris Jobke
1d816add44
Merge pull request #20965 from nextcloud/backport/20033/stable18
[stable18] Enable fseek for files in S3 storage
2020-05-25 13:38:04 +02:00
Robin Appelman
3d3ee1bfae
harden seekable http stream a bit against failures
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-05-22 15:29:43 +02:00
Robin Appelman
25f5a5e575
update autoloader
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-05-20 22:59:08 +02:00
Robin Appelman
136a716df0
add basic tests for s3 seeking and add some error handling if reopen return the wrong range
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-05-20 22:58:58 +02:00
Robin Appelman
8434d0af9f
make seekable s3 stream generic
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-05-20 22:57:36 +02:00
Lukas Stabe
7a62514c31
Enable fseek for files in S3 storage
Signed-off-by: Lukas Stabe <lukas@stabe.de>
2020-05-20 22:57:30 +02:00
Julien Lutran
1a990b9487 Fix issues with Keystone auth v3 in files_external app
Signed-off-by: Julien Lutran <julien.lutran@corp.ovh.com>
2020-05-15 15:19:36 +00:00
Robin Appelman
3998f94ec0 dont try to update storage mtime if we can't get the mtime
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-05-01 16:22:50 +00:00
Robin Appelman
adf88bb418 Close the streams in writeStream even when there is an exception
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-04-15 08:49:53 +00:00
Morris Jobke
276a650d0f
Merge pull request #20163 from nextcloud/backport/19782/stable18
[stable18] Use global used space in quota wrappen when external storage is included
2020-04-14 14:08:20 +02:00
Roeland Jago Douma
734c1a4649
Merge pull request #20334 from nextcloud/backport/20284/stable18
[stable18] Properly catch NoUserException during upload cleanup
2020-04-14 10:59:24 +02:00
Joas Schilling
ed4927a266 Try to use the display name of file transfers
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-04-08 17:38:14 +00:00
Julius Härtl
ab699661ce Properly hint exceptions thrown by getUserFolder
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-04-06 16:47:55 +00:00
Roeland Jago Douma
874c468c02 Actually check if the owner is not null
Else this can error out on storages that do not have an owner (e.g.
groupfolders).

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-03-27 13:51:47 +00:00
Robin Appelman
41a839a63d Use global used space in quota wrappen when external storage is included
Signed-off-by: Robin Appelman <robin@icewind.nl>
2020-03-25 13:18:59 +00:00
Roeland Jago Douma
ebba16a219 Get correct mimetype on objectstores
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-03-12 18:59:58 +00:00
Joas Schilling
67fbacee59 Allow to overwrite the path on the cache event
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-02-17 16:42:16 +00:00
Joas Schilling
20748e1f4d Don't create invalid users
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-02-13 09:15:14 +00:00
Christoph Wurst
1b46621cd3
Update license headers for 18
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-20 09:23:25 +01:00
Christoph Wurst
b81b824da1
Add typed events for the filesystem/scanner
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-13 09:41:05 +01:00
Roeland Jago Douma
c6e51924c8
Merge pull request #18236 from nextcloud/bugfix/noid/always-detect-mimetype-by-content-in-workflows
Allow to detect mimetype by content
2019-12-12 11:19:55 +01:00
Roeland Jago Douma
4356c91ffd
Fix detection of non extention types
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-12-12 09:58:22 +01:00
Roeland Jago Douma
4fad9e4e6b
Merge pull request #18314 from nextcloud/fixFileIdSearch
Fix ambigious fileID on search
2019-12-10 11:28:40 +01:00
Joas Schilling
107ef72afb
Try more methods
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-12-10 10:56:47 +01:00
tobiasKaminsky
41cb214112
fix https://github.com/nextcloud/server/issues/18313
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2019-12-10 09:47:30 +01:00
Joas Schilling
da44c2a414
Some more fixes in detecting the mimetype from the content
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-12-10 09:11:42 +01:00
Joas Schilling
1336dedd5d
Cleanup the code
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-12-10 09:11:40 +01:00
Joas Schilling
b92ebb928a
Allow to check for the mimetype by content only
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-12-10 09:10:32 +01:00
Roeland Jago Douma
5dba8d318d
Fix search limit to home
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-12-09 20:38:13 +01:00
Daniel Kesselberg
29575c4d36
Move custom definition logic into method
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2019-12-09 12:10:19 +01:00
Daniel Kesselberg
64aba49461
Ensure that we don't merge broken json.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2019-12-09 12:09:43 +01:00
Christoph Wurst
5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00
Roeland Jago Douma
63cb31542d
Merge pull request #17941 from nextcloud/search-by-owner
Allow filtering the search results to the users home storage
2019-12-05 11:04:33 +01:00
Roeland Jago Douma
81b919ed9f
Merge pull request #18163 from nextcloud/fix_file_size
fix filename size
2019-12-04 14:15:07 +01:00
Roeland Jago Douma
76b78edd40
Merge pull request #17833 from nextcloud/propagator-no-negative-sizes
dont set folder size to negative values during propagation
2019-12-04 11:49:26 +01:00