91 Commits

Author SHA1 Message Date
Manuel Jenny
fe15c748bc
fix(S3): ContentRepositoryFactory to use proper Cloud 2021-04-30 09:22:21 +02:00
Manuel Jenny
24e96b7205
fix(S3): make sure the build works 2021-04-30 09:22:21 +02:00
Manuel Jenny
bc3c0adba5
feat(S3): use SUFFIX, remove unthrowable exceptions 2021-04-30 09:22:21 +02:00
Manuel Jenny
7d9c20d137
feat(S3): cleanup S3CloudContentRepository
- use proper signature
- add TODO for error handling
2021-04-30 09:22:20 +02:00
Manuel Jenny
4afd6bc703
feat(S3): implement exists(), write(), read() and delete()
- add implementation for `exists()`
- add implementation for `write()`
- add implementation for `read()`
- add implementation for `delete()`
- add support for `currentAccount()`
2021-04-30 09:22:20 +02:00
Manuel Jenny
c63db47e56
feat(S3): support PutObjectResult, fix key / name
- add S3File creation with `PutObjectResult` support.
- properly extract name of file / folder from key.
2021-04-30 09:22:20 +02:00
Manuel Jenny
fe21e3988d
chore(pCloud): rename folder to parent 2021-04-30 09:22:20 +02:00
Manuel Jenny
3cf028ddce
feat(S3): implement list() and create() 2021-04-30 09:22:20 +02:00
Manuel Jenny
250e711d4a
feat(S3): implement S3CloudNodeFactory 2021-04-30 09:22:19 +02:00
Manuel Jenny
00a63228c1
feat(S3): initial structure (non functional S3Impl) 2021-04-30 09:22:19 +02:00
Manuel Jenny
0224532c45
feat(S3): add AWS S3 SDK dependency 2021-04-30 09:22:19 +02:00
Julian Raufelder
4f8f817808
#307 fix pCloud login in F-Droid 2021-04-24 23:37:07 +02:00
Manuel Jenny
c9489a3795
fix(pCloud): issue #305 NullReference
Fix #305: NullReference when calling loadFolder with empty string
2021-04-23 17:19:34 +02:00
Julian Raufelder
9364d77f80
Merge branch 'feature/pcloud' into develop 2021-03-26 21:02:08 +01:00
Julian Raufelder
9843e77c3f
Reformat code to apply to project style guide 2021-03-26 17:07:08 +01:00
Manuel Jenny
d227c5c0fd
fix: use static sets, user proper name 2021-03-26 17:07:07 +01:00
Manuel Jenny
728d5262ab
fix: handleApiError() with name 2021-03-26 17:07:07 +01:00
Manuel Jenny
d3609ac691
fix: directly return newFile 2021-03-26 17:07:07 +01:00
Manuel Jenny
aaf7f4bfb5
fix: remove file encoding left overs 2021-03-26 17:07:07 +01:00
Manuel Jenny
c57a59c29b
fix: remove filename encoding 2021-03-26 17:07:06 +01:00
Manuel Jenny
6217c42440
chore: add TODO regarding filename encoding 2021-03-26 17:07:06 +01:00
Manuel Jenny
e1bc82b89a
fix: throw NoSuchCloudFileException if API Error Code is 2002 2021-03-26 17:07:06 +01:00
Manuel Jenny
5695a5c0ed
Revert "fix: list for root folder"
This reverts commit a2215694b1a25312dfeaced866561ec1447f09a9.
2021-03-26 17:07:05 +01:00
Manuel Jenny
e35f1d6087
fix: list for root folder 2021-03-26 17:07:05 +01:00
Manuel Jenny
9b93fb9623
feat: remove idCache and switch to loading with paths 2021-03-26 17:07:05 +01:00
Manuel Jenny
6ccee05851
fix: instantiate separate idCache for each PCloud instance 2021-03-26 17:07:04 +01:00
Manuel Jenny
d3bb9d30aa
fix: remove cache for OkHttpClient 2021-03-26 17:07:04 +01:00
Manuel Jenny
20939f9ba0
fix: rename writeData to writeToData 2021-03-26 17:07:04 +01:00
Manuel Jenny
c5c139f962
fix: once again remove unused imports... 2021-03-26 17:07:04 +01:00
Manuel Jenny
b97a4750c6
feat: implement file cache
Due to the way the pCloud revision handling is implemented every
download will actually be a cache miss even if the file is small enough
and didn't change since last download.

Therefore, we have to implement our own file cache.
2021-03-26 17:07:03 +01:00
Manuel Jenny
8c030a5f9c
fix: throw NoSuchCloudFileException if fileId is missing 2021-03-26 17:07:03 +01:00
Manuel Jenny
81bde173f1
fix: improve exception handling for read() 2021-03-26 17:07:03 +01:00
Manuel Jenny
2158e2a0d4
fix: move from stat to loadFile 2021-03-26 17:07:02 +01:00
Manuel Jenny
44c5029651
fix(rebase): use proper setter for Url 2021-03-26 17:07:02 +01:00
Manuel Jenny
5904073776
fix: remove unused imports 2021-03-26 17:07:02 +01:00
Manuel Jenny
2fcf53b633
feat: add exception handling 2021-03-26 17:07:02 +01:00
Manuel Jenny
1146a5e8fc
fix: file upload with unencoded filename
There seems to be an issue with unencoded filenames when uploading a new
file to the vault.

E.g. file name
"YYbfUTn6ViuRkXzeXXYAAu8z6DwFMrTNtPY3zpjn24RIUmzqqi4=.c9r" will result
in a broken upload. Encoding the filename will solve this:
"YYbfUTn6ViuRkXzeXXYAAu8z6DwFMrTNtPY3zpjn24RIUmzqqi4%3D.c9r"

However, this will actually result in the file's name being encoded. If
the filename and the encoded filename do not match we need to rename the
uploaded file using the correct filename.
2021-03-26 17:07:01 +01:00
Manuel Jenny
d9d88df49a
fix: use ROOT_FOLDER_ID inline 2021-03-26 17:07:01 +01:00
Manuel Jenny
eba5ab6a4c
fix: get root folder id from RemoteFolder 2021-03-26 17:07:01 +01:00
Manuel Jenny
80a0d7cdcd
fix: throw WrongCredentialsException in findEntry() 2021-03-26 17:07:01 +01:00
Manuel Jenny
369e1d1945
feat: add error code for revoked access token 2021-03-26 17:07:00 +01:00
Manuel Jenny
c1ca71be82
fix: remove PCloudIdCloudNode interface 2021-03-26 17:07:00 +01:00
Manuel Jenny
f7411ea286
fix: remove unused import 2021-03-26 17:07:00 +01:00
Manuel Jenny
d92e4b0daf
fix: rename PCloudCloud stuff to PCloud 2021-03-26 17:06:59 +01:00
Manuel Jenny
0bb01fec0e
fix: remove unused imports 2021-03-26 17:06:58 +01:00
Manuel Jenny
90c7c14471
fix: simplifications
- Change all `CloudNode` to `PCloudNode`
- Check `replace` before `exists()`
- Move definition of relocationEntry below exception
- Change `CloudFile` to `PCloudFile`
2021-03-26 17:06:58 +01:00
Manuel Jenny
b6cebf16fb
fix: move decrypt() for accessToken 2021-03-26 17:06:58 +01:00
Manuel Jenny
c958558f50
fix: change signatures, remove unneccessary methods
- Change signatures of PCloudImpl, PCloudFile and PCloudFolder to match
  Google Drive implementation
- Remove unneccessary file() and folder() methods (read path directly)
2021-03-26 17:06:57 +01:00
Manuel Jenny
615fe5558e
fix: move() only rename if relocationResult has different name than target 2021-03-26 17:06:57 +01:00
Manuel Jenny
46dbde1103
fix(move): rename file after relocation 2021-03-26 17:06:57 +01:00