summaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/google.php
Commit message (Collapse)AuthorAgeFilesLines
* GDrive stream download with RetryWrapperVincent Petry2016-03-301-4/+5
|
* Use the shipped cacerts.pem instead of the global oneLukas Reschke2016-03-301-0/+1
| | | | The one we ship may cause problems since Equifax is not included anymore (SHA-1 certs) are deprecated. We should just be consistent here and also use the certificate file which is used by the other calls in the library.
* Only use GDrive chunks when neededVincent Petry2016-03-171-29/+43
|
* Chunk upload for GDriveVincent Petry2016-03-161-6/+39
| | | | | Instead of storing the WHOLE file in memory in a PHP variable, use the library's chunk upload support.
* Fix compatibility with PHP 5.4Lukas Reschke2016-03-081-1/+2
| | | | Fixes https://github.com/owncloud/core/issues/22960
* More error handlingLukas Reschke2016-02-251-2/+6
|
* Copy into local fileLukas Reschke2016-02-251-3/+5
| | | | | | | | | | | | Using the Guzzle stream directly here will only return 1739 characters for `fread` instead of all data. This leads to the problem that the stream is read incorrectly and thus the data cannot be properly decrypted => :bomb: This approach copies the data into a local temporary file, as done before in all stable releases as well as other storage connectors. While this approach will load the whole file into memory, this is already was has happened before in any stable release as well. See https://github.com/owncloud/core/commit/d608c37c90c308d0518d854de908ec4be5f462dc for the breaking change. To test this enable Google Drive as external storage and upload some files with encryption enabled. Reading the file should fail now. Fixes https://github.com/owncloud/core/issues/22590
* Merge pull request #22405 from owncloud/gdrive-mimetype-and-office-fixesThomas Müller2016-02-191-4/+13
|\ | | | | Fix GDrive handling of office files
| * Fix GDrive handling of office filesVincent Petry2016-02-151-4/+13
| | | | | | | | | | | | | | | | | | | | 1) Properly detect empty file extension, can be null. 2) When renaming part file to final file, use the correct file name without extension, if it exists 3) When renaming a file, do not delete the original file if it had the same id, which can happen with part files
* | Fix GDrive mime type detection with encryptionVincent Petry2016-02-151-1/+2
|/ | | | | | When encryption is enabled, GDrive would think that all files are text files. This fix falls back to the extension based detection when a non-special mime type is returned
* Use Guzzle stream to download files from GDriveVincent Petry2016-01-141-6/+16
| | | | | | | | The API library does not support streaming and always reads the full file into memory. This workaround copies the signed headers to a Guzzle request and returns the response as stream.
* Happy new year!Thomas Müller2016-01-121-2/+2
|
* deduplicate @xenopathicMorris Jobke2015-10-061-1/+1
|
* update licence headers via scriptMorris Jobke2015-10-051-0/+1
|
* Merge pull request #12088 from AdamWill/google-opendir-rootVincent Petry2015-09-011-2/+0
|\ | | | | [WIP] google: drop duplicate path trim from opendir()
| * google: drop duplicate path trim from opendir()Adam Williamson2014-11-101-2/+0
| | | | | | | | | | | | | | opendir() trims the path passed then calls getDriveFile() - which immediately does the same trim operation. This breaks opendir() on the root directory, which causes the failure of the testStat() test when it checks the ctime of the root dir.
* | Use OCP classes as much as possible in files_externalRobin McCorkell2015-08-191-3/+3
| |
* | Use the new IteratorDirectory instead of the fakedir wrapperRobin Appelman2015-07-151-2/+3
| |
* | Revert "Use OCP classes as much as possible in files_external"Thomas Müller2015-07-021-2/+2
| |
* | Use OCP classes as much as possible in files_externalRobin McCorkell2015-07-011-2/+2
| |
* | update license headers and authorsMorris Jobke2015-06-251-0/+1
| |
* | Only escape single quotesLukas Reschke2015-03-311-2/+2
| |
* | Added rawurlencode for other params in GDrive storageVincent Petry2015-03-311-2/+2
| |
* | Properly quote file names in listFiles query for GDriveVincent Petry2015-03-311-1/+1
| |
* | Revert "Properly quote file names in listFiles query for GDrive"Lukas Reschke2015-03-311-2/+2
| |
* | Merge pull request #15215 from owncloud/ext-gdrivelistfilequotingFrank Karlitschek2015-03-311-2/+2
|\ \ | | | | | | Properly quote file names in listFiles query for GDrive
| * | Added rawurlencode for other params in GDrive storageVincent Petry2015-03-261-2/+2
| | |
| * | Properly quote file names in listFiles query for GDriveVincent Petry2015-03-261-1/+1
| | |
* | | Update license headersJenkins for ownCloud2015-03-261-12/+22
|/ /
* | drop any fallback code related to curl - refs ↵Thomas Müller2015-03-121-5/+1
| | | | | | | | https://github.com/owncloud/core/pull/14838#issuecomment-78586447
* | Revert "Updating license headers"Morris Jobke2015-02-261-22/+13
| | | | | | | | This reverts commit 6a1a4880f0d556fb090f19a5019fec31916f5c36.
* | Updating license headersJenkins for ownCloud2015-02-231-13/+22
| |
* | google: delete original after successful renameAdam Williamson2014-11-301-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In GDrive, filenames aren't unique, and directories are just special files - so you can have multiple files with the same name, multiple directories with the same name, and even files with the same names as directories. OC doesn't handle this at all, though, and just wants to act as if file and directory names *are* unique. So when renaming, we must check if there's an existing object with the same file or directory name before we commit the rename, and explicitly delete it if the rename is successful. (Other providers like dropbox do the same for files, but intentionally don't do it for directories; we really need to do it for directories too.) A good way to observe this is to run the storage unit tests and look at the state of the Drive afterwards. Without this commit, there will be several copies of all the test files and directories. After this commit, there's just one of each. We can't just say "hey, Drive lets us do this, what's the problem?" because we don't handle multiple-objects, same-name cases - getDriveFile() just bails and prints an error if it searches for the file or directory with a given name and gets multiple results.
* | Merge pull request #6989 from AdamWill/google-1Robin Appelman2014-11-261-24/+32
|\ \ | | | | | | Migrate Google Drive external storage app to v1.0.6-beta of the google-api-php-client library
| * | google: disable compression when curl is not availableAdam Williamson2014-11-071-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a slightly hacky workaround for https://github.com/google/google-api-php-client/issues/59 . There's a bug in the Google library which makes it go nuts on file uploads and transfer *way* too much data if compression is enabled and it's using its own IO handler (not curl). Upstream 'fixed' this (by disabling compression) for one upload mechanism, but not for the one we use. The bug doesn't seem to happen if the google lib detects that curl is available and decides to use it instead of its own handler. So, let's disable compression, but only if it looks like the Google lib's check for curl is going to fail.
| * | scrutinizer fix: explicitly declare Google class property $clientAdam Williamson2014-11-061-0/+1
| | |
| * | scrutinizer fix: correct @return for getDriveFile()Adam Williamson2014-11-061-2/+3
| | |
| * | Migrate Google Drive storage app to v1.0.0 of the client libraryAdam Williamson2014-11-061-24/+24
| |/
* / fix touch() when $mtime is set (Google wants RFC3339) #11267Adam Williamson2014-11-101-1/+4
|/ | | | | | | | | | ownCloud passes us a Unix time integer, but the GDrive API wants an RFC3339-formatted date. Actually it wants a single particular RFC3339 format, not just anything that complies will do - it requires the fractions to be specified, though RFC3339 doesn't. This resolves issue #11267 (and was also noted by PVince81 in reviewing PR #6989).
* Lazy initialize external storagesVincent Petry2014-10-221-0/+1
| | | | | | | | Fixed the following external storages to not connect in the constructor, but do it on-demand when getConnection() is called. - S3 - SWIFT - SFTP
* Check if a folder is deletable before we try to recursively delete itRobin Appelman2014-09-171-0/+3
|
* move to public namespaceMorris Jobke2014-08-191-1/+1
|
* Fix STORAGE_* constants usage by moving those constants into ↵Stephan Peijnik2014-08-191-1/+1
| | | | | | | | | | \OC\Files\Filesystem. As constants not defined within a class cannot be automatically found by the autoloader moving those constants into a class makes them accessible to code which uses them. Signed-off-by: Stephan Peijnik <speijnik@anexia-it.com>
* Moved dependency checks to end of class filesPhilipp Kapfer2014-04-031-12/+11
| | | | | | | | | | Dependency messages now appear below the configuration options instead of above Reworked dependency check method to support consolidated messages for multiple backends Conflicts: apps/files_external/lib/google.php apps/files_external/lib/swift.php apps/files_external/templates/settings.php
* Changed dependency check messages from warnings to notesPhilipp Kapfer2014-04-031-1/+1
| | | | Added check for duplicate dependency check messages to display only the first
* Added cURL dependency check to Google Drive and WebDAV backendPhilipp Kapfer2014-04-031-0/+12
| | | | | | | | Added check for backend's checkDependencies method to OC_Mount_Config::getBackends() when backend is configured to have some instead of blindly calling it and crashing Conflicts: apps/files_external/lib/config.php apps/files_external/lib/google.php
* Scrutinizer Auto-FixesScrutinizer Auto-Fixer2014-02-191-1/+1
| | | | | | | | | | | This patch was automatically generated as part of the following inspection: https://scrutinizer-ci.com/g/owncloud/core/inspections/cdfecc4e-a37e-4233-8025-f0d7252a8720 Enabled analysis tools: - PHP Analyzer - JSHint - PHP Copy/Paste Detector - PHP PDepend
* Merge branch 'master' into scrutinizer_documentation_patchesThomas Müller2014-02-181-2/+3
|\ | | | | | | | | Conflicts: lib/private/migration/content.php
| * Remove usage of legacy OC_AppconfigRobin Appelman2014-02-131-2/+3
| |
* | polish documentation based on scrutinizer patchesJörn Friedrich Dreyer2014-02-061-1/+1
|/