Commit Graph

133 Commits

Author SHA1 Message Date
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
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
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00
Robin Appelman bf50342c10
add @since to limitToHome
Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-12-03 15:21:35 +01:00
Robin Appelman c62637da8b
Allow filtering the search results to the users home storage
This is done by adding a

```xml
<d:eq>
    <d:prop>
        <oc:owner-id/>
    </d:prop>
    <d:literal>$userId</d:literal>
</d:eq>
```

clause to the search query.

Searching by `owner-id` can only be done with the current user id
and the comparison can not be inside a `<d:not>` or `<d:or>` statement

Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-12-03 13:49:37 +01:00
Julius Härtl 9eb1554fad
Properly anotate LockedException in files node api
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-11-28 14:17:15 +01:00
Roeland Jago Douma 68748d4f85
Some php-cs fixes
* Order the imports
* No leading slash on imports
* Empty line before namespace
* One line per import
* Empty after imports
* Emmpty line at bottom of file

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-22 20:52:10 +01:00
Robin Appelman 136c4ef925
dont expose metadata etag for now
Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-11-13 12:39:36 +01:00
Robin Appelman 1b6e647b63
expose filecache extension data in FileInfo
Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-11-13 12:39:32 +01:00
Robin Appelman 842da3f183
store filecache extension fields
Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-11-13 11:30:44 +01:00
Roeland Jago Douma 0487144b26
Remove deprecated searchByTag
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-07-26 12:29:19 +02:00
Roeland Jago Douma 5d360bd16f
Harden appdata putcontent
If for whatever reason appdata got into a strange state this will at
least propegate up and not make it do boom the next run.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-04-08 13:22:00 +02:00
Robin Appelman 8fc47c6f00
add option to get raw size (without submounts) from fileinfo
Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-02-27 15:35:44 +01:00
Robin Appelman 092f78d7a4
add event for cache update
Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-02-18 16:50:41 +01:00
Morris Jobke baa6a2d52c
Merge pull request #13748 from nextcloud/cache-insert-event
add event for inserting cache entries
2019-02-07 16:35:02 +01:00
Robin Appelman 748bcd407b
add event for inserting cache entries
this provides a reliable way for apps to listen to new files
without the need to of cache wrappers to hook into inserts themselves
(something which isn't 100% reliable)

Signed-off-by: Robin Appelman <robin@icewind.nl>
2019-02-07 15:51:30 +01:00
Morris Jobke f45df6096b
Add since labels
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-02-07 14:23:16 +01:00
Michael Weimann bf1253cb49
Implement guest avatar endpoint
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
2019-02-07 14:23:16 +01:00
Robin Appelman 6c9f2644cf
Add objectExists to objectstore interface
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-12-12 14:17:19 +01:00
Robin Appelman 2c1f6331a4
Add interface to allow storages from opting out of encryption
As opposed to hard-coding a list of excluded storages

Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-11-29 16:31:34 +01:00
Morris Jobke cef8eadf2a
Add PHPDoc for thrown exception
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-11-19 15:34:07 +01:00
Christoph Wurst 1b85ef4bf2
Fix string doc type casing
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2018-11-15 11:57:05 +01:00
Robin Appelman 93de63777e
extend storage api to allow directly writing a stream to storage
this removes the need for temporary storages with some external storage backends.
The new method is added to a separate interface to maintain compatibility with
storage backends implementing the storage interface directly (without inheriting common)

Currently the interface is implemented for objectstorage based storages and local storage
and used by webdav uploads

Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-10-31 21:10:44 +01:00
Robin Appelman e5c3e4b76f
Add getExtension() to FileInfo
this is a fairly common operation so it makes sense to prevent having
to repeatedly implement it.

Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-10-29 15:24:02 +01:00
Morris Jobke cc9073c251
Merge pull request #10179 from nextcloud/mount-filter
Add the option to filter mounts for a user
2018-07-11 16:29:09 +02:00
Julius Härtl 6da2b7c4f6
Separate fopen into read and write methods
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-07-11 12:08:37 +02:00
Julius Härtl f1469e34aa
Add fopen method to ISimpleFile
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-07-11 10:29:03 +02:00
Robin Appelman 3ad6084891
Add the option to filter mounts for a user
Signed-off-by: Robin Appelman <robin@icewind.nl>
2018-07-10 16:49:26 +02:00
Julius Härtl 73cf71a20f
Add resource type phpDoc for putContent methods
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-06-26 13:58:58 +02:00
Roeland Jago Douma 575dc29c27
Make Appdata static
* Add fileid for simpleroot folders (only internal)

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-05-14 13:25:54 +02:00
Roeland Jago Douma 73e6eea57e
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-04-04 12:50:54 +02:00
Roeland Jago Douma 7f1141f7e9
Make the MountManager strict
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-04-04 12:44:28 +02:00
Roeland Jago Douma 53447ae2b2
Throw an exception if file_put_contents fails
* This will help with AppData hardening etc
* Introduced a GenericFileException for if nothing else is appropiate
  - Maybe the other File exceptions should base on this?

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-03-27 16:23:06 +02:00
Morris Jobke 39bb32af71
Add hint about OCP\Folder::getById
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-03-21 14:49:32 +01:00
Roeland Jago Douma 8b5997483c
Hardening of SimpleFile getContent
if file_get_contents fails remove the file. And traverse up the tree
checking if the other folders are there.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-02-27 13:35:09 +01:00
Robin Appelman 1066faa8ba
Fix filename typo
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-12-12 14:18:49 +01:00
Lukas Reschke 989a8a3668
Merge pull request #6220 from nextcloud/cached-mount-info-filepath
Allow getting the filepath when getting cached mounts by fileid
2017-11-09 00:04:25 +01:00
Morris Jobke 0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +01:00
Robin Appelman 3f0cb13042
Allow getting the filepath when getting cached mounts by fileid
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-10-27 14:35:34 +02:00
Julius Härtl 4cfa1c66b8
Doc: Fix phpDoc issues
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2017-10-23 23:23:56 +02:00
Lukas Reschke dfd8125aeb
Replace wrong PHPDocs
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-08-01 08:20:16 +02:00
Roeland Jago Douma e1da8a769b
AppData is no longer internal
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-08-01 08:20:15 +02:00
Roeland Jago Douma 361d2badd8
Some phpstorm inspection fixes
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-07-22 21:10:16 +02:00
Morris Jobke 96e1daba33 Added missing PHPDoc for @since
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-06-21 12:23:55 -05:00
Robin Appelman 2e8e6f95b9
show used space in user list
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-06-15 14:06:54 +02:00
Robin Appelman ab9a36e872
allow apps to set custom mount types
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-04-28 09:38:21 +02:00
Morris Jobke c54a59d51e
Remove unused use statements
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-22 19:23:31 -05:00
Robin Appelman 6fbe991afb
limit the user when searching for a file by id if we know the user already
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-04-21 17:11:26 +02:00
Joas Schilling 88015bc51f
Fix type hints and doc blocks
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-03-23 17:52:47 +01:00
Felix Heidecke 11f838f9e4
Add ignore_files to config,
test files against ignore_files list on upload

fix typo and indentation

Move blacklist declaration to lib/public/Files/FileInfo.php,

Rename *ignored to *blacklisted

Mocked blacklist_files for testing

Mocked blacklist_files for testing

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-20 01:17:12 -06:00
Roeland Jago Douma 6565533d3b Merge pull request #3600 from coletivoEITA/master
added method needsPartFile() in Storage
2017-03-14 15:14:59 +01:00
Vinicius Cubas Brand 13e50cbcd7 added method needsPartFile() in Storage
Signed-off-by: Vinicius Cubas Brand <viniciuscb@gmail.com>
2017-03-14 10:06:50 -03:00
Robin Appelman e61606a767
Allow searching for favorites
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-03-08 16:30:55 +01:00
Robin Appelman e6a896f2f0
add tests for searchQuery
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-03-01 14:06:40 +01:00
Robin Appelman df2063ee7b
Implement webdav SEARCH
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-03-01 14:06:39 +01:00
Robin Appelman 706131b394
add icewind/searchdav
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-02-28 14:24:18 +01:00
Morris Jobke 7f73ee0764
Add missing PHPDoc and properly throw exception
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-02-13 18:03:35 -06:00
Robin Appelman 76f8247516
Add since
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-01-27 10:44:48 +01:00
Robin Appelman 269747985e
Add a more powerful notify mechanism
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-01-27 10:44:33 +01:00
Robin Appelman f73527c42f
minor storage interface tweaks
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-01-24 16:58:04 +01:00
Joas Schilling 558f169671
Move the validation into one place only
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-11-21 09:23:37 +01:00
Roeland Jago Douma f07d75a4dd
@since 9.2.0 to @since 11.0.0
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-15 18:51:52 +01:00
Vincent Petry 44cf67accd
Storage 503 message improvements
"Storage not available" is now "Storage temporarily not available".
Exceptions are now logged in DEBUG level, not FATAL.
2016-10-24 15:43:15 +02:00
Robin Appelman 0d842e0550
optimize Folder::getById to use less queries
Signed-off-by: Robin Appelman <robin@icewind.nl>
2016-10-12 16:12:28 +02:00
Morris Jobke 316db0a97b add proper exception documentation for ISimpleFS interface
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2016-10-05 23:47:00 +02:00
Roeland Jago Douma 6807cb684f
avatar to appdata
* Fix AvatarTest

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-05 11:00:16 +02:00
Roeland Jago Douma 5d8b941fea
Initial AppData
* Introduce simpleFS
* Introduce IAppData
* Introduce AppData Factory to get your AppData folder
* Update FileDisplayResponse

* AppData implements a ISimpleRoot but lazy. So only if an apps starts
  to access data will stuff get initialized

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-05 11:00:14 +02:00
Joas Schilling a9f36067fd
Fix constant name, copy-pasterino 2016-08-17 10:41:13 +02:00
Robin Appelman a999420c75 get shared storage storage id without setting up the storage 2016-08-09 15:52:13 +02:00
Robin Appelman 81e103074e use limit instead of since when listing recent files 2016-07-22 15:20:55 +02:00
Robin Appelman e321ecd592 add recent files to node api 2016-07-22 14:39:32 +02:00
Joas Schilling 0215b004da
Update with robin 2016-07-21 18:13:58 +02:00
Joas Schilling ba87db3fcc
Fix others 2016-07-21 18:13:57 +02:00
Robin Appelman d485cfd40d fix since 2016-07-15 13:58:44 +02:00
Robin Appelman e1fa314b18 add notify support to smb storage 2016-07-14 14:46:01 +02:00
Robin Appelman 29eeeb2273 Save the files external mount id in the mount cache table 2016-07-13 16:34:08 +02:00
Robin Appelman 9fb44e34af add propagator batching 2016-06-02 15:07:47 +02:00
Lukas Reschke aba539703c
Update license headers 2016-05-26 19:57:24 +02:00
Vincent Petry adcf942901 Merge pull request #24750 from owncloud/lenz1111-share_download_range_requests_support
Http Range requests support in downloads
2016-05-23 21:01:26 +02:00
Piotr Filiciak 6577bbe887 Code style and doc fix 2016-05-23 15:17:00 +02:00
Robin Appelman eca57be336 Only recurse into incomplete folders during background scans 2016-05-23 14:40:35 +02:00
Piotr Filiciak 9999e05660
Http Range requests support in downloads
Http range requests support is required for video preview
2016-05-20 18:16:44 +02:00
Roeland Jago Douma 4a53542e45
Move \OCP\Files to PSR-4 2016-05-18 14:35:50 +02:00