Commit graph

25 commits

Author SHA1 Message Date
abraunegg 1fbe1d34a7
Fix application crash due to a conversion overflow when calculating file offset for session uploads (#1558)
* Fix an unhandled application crash when calculating the required offset for a file fragment size when resuming a session upload
2021-07-12 05:59:32 +10:00
abraunegg b7eedbd8cd
Fix that options --upload-only & --remove-source-files are ignored on an upload session restore (#1399)
* Fix that options --upload-only & --remove-source-files are ignored on an upload session restore
2021-04-12 06:16:23 +10:00
abraunegg 3b18638a63
Remove duplicate code for error output functions and enhance error logging output (#1170)
* Remove duplicate code for error output functions and enhance error logging output
2020-12-09 14:18:16 +11:00
abraunegg cb06395a46
Catch unhandled MonitorException when inotify throws an error (Issue #903) (#905)
* Catch uphandled MonitorException when inotify throws an error
* Change monitor loop init full scan to false at start as fullScanOverride now correctly handled, negating need to true-up at application start
* Handle '100 Continue' response during upload
* Update handling of delta link being expired
* Update progress bar handling for uploads as #888 changed bar dynamics
2020-05-06 07:20:13 +10:00
abraunegg c05243444f
Update progress bar to be more accurate when downloading large files (#888)
* Change from round to floor, so % bar increases when downloaded data is at X% not potentially under, thus leading to under reporting
* Add debug output when each % increase when downloading a file to assist with validating progress
* Start displaying ETA starting at 5% rather than 10%
2020-04-26 06:52:29 +10:00
abraunegg edd365d21b
Update error response handling for catching HTTP 429 responses - activityLimitReached (Issue #815) (#816)
* Overhaul OneDrive error response handling for 429 errors by utilising the HTTP response header Retry-After to configure the correct 'retry' window. If no retry window is set, defaults to 120 seconds.
* Update error response messaging when a 429 response is received
* Update how the original OneDrive query is retried when a 429 response is received
* Update the User Agent string to be more compliant with OneDrive decoration requirements to assist in avoiding 429 responses due to incorrect User Agent string being used. Updated to: ISV|abraunegg|OneDrive_Client_for_Linux/v%version_tag%
2020-03-20 06:12:47 +11:00
abraunegg c876b9c575
Retry session upload fragment when transient errors occur to prevent silent upload failure (#721)
* When uploading data to OneDrive via a session, and OneDrive throws an exception response, retry the fragment upload instead of silently failing without any error message
* Add error message & error logging when uploading data via a session and OneDrive throws an exception
2019-11-11 20:27:34 +11:00
abraunegg fd4547376c
Fix crash when resume_upload file is not a valid JSON (#664)
* Validate that there is JSON data in the string before the string is read via parseJSON()
* Add try block to catch file system exceptions if they are generated when attempting to update the file date & time
2019-09-22 06:40:39 +10:00
abraunegg 5cd860a398
Fix handling of 5xx responses from OneDrive when uploading via a session (Issue #632) (#631)
* Fix handling of 5xx responses from OneDrive when performing a session upload
* Switch to same checks when doing non session upload so that OneDrive exceptions are thrown correctly
* Remove a 'throw e' when curl times out
* Remove a needless 'throw e' when a session upload cannot be found
* Set the upload failed flag when OneDrive errors on session uploads
2019-08-31 05:27:49 +10:00
abraunegg 4a4611ccea
Update fix for Issue #555 (#559)
* Update fix for #555 as try | catch block for session creation appears to miss error response codes
* Update how JSONValue object is determined to be valid
* Add error logging when response is not a valid JSON object
2019-06-30 10:12:25 +10:00
abraunegg 15a2749382
Handle OneDrive error response on creating upload session (#556)
* Add a try block when attempting to create the upload session and handle if there is an error response from OneDrive
* Should return a JSONValue regardless of error
2019-06-27 18:40:18 +10:00
abraunegg ea26e4d830
Add logging as to why resume upload failed (Issue #468) (#470)
* Log 'why' the resume upload failed
* Remove the 'resume_upload' as it is invalid & contains bad data
2019-04-15 10:56:11 +10:00
abraunegg c6923cdf29
Update 'resume_upload' handling in the event of bad OneDrive response (Issue #468) (#469)
* Add JSON response checks in the event OneDrive sends malformed data
2019-04-15 08:10:48 +10:00
abraunegg e849eb3de4
Resolve Key not found: nextExpectedRanges (Issue #408) (#409)
* Dont 'assume' that the key value pairs exist. Check if they do before attempting to use them
2019-03-12 11:49:15 +11:00
abraunegg 86ea576144
Handle HTTP request returned status code 412 (Precondition Failed) for session uploads (#227)
* Handle HTTP request returned status code 412 (Precondition Failed) for session uploads to OneDrive Personal Accounts
* Fix Failed to remove file /root/.config/onedrive/resume_upload: No such file or directory if there is a session upload error and the resume file does not get created
* Handle response codes when using 2 different systems using --upload-only but the same OneDrive account and uploading the same filename to the same location
2018-11-11 11:15:48 +11:00
abraunegg 74b9163b06
Resolve Key not found: expirationDateTime on session resume (Issue #174) (#176)
* Handle an invalid response on session resume when a 4xx / 5xx response is generated from the OneDrive service
2018-10-04 09:38:23 +10:00
abraunegg e0b1b595e4
Add file access check for file upload (#116)
* Add a check to validate that we can read the file by reading the first 10MB when uploading a new file or resuming an upload
2018-08-14 18:30:13 +10:00
abraunegg bed2b6c75f
Implement Feature Request: Add a progress bar for large uploads & downloads (Issue #12) (#99)
* Implement feature request to add a progress bar for large file uploads & downloads
2018-08-10 07:46:27 +10:00
abraunegg 83c28ba3b6
Fix: Multiple versions of file shown on website after single upload (Issue #2) (#40)
* Resolve multiple versions of file shown on website after single upload - however Issue #23 & OneDrive API bug (https://github.com/OneDrive/onedrive-api-docs/issues/877) will still create 2 file versions on OneDrive Business. The work around is to disable file versions until #877 is resolved.
2018-07-03 07:24:57 +10:00
abraunegg d6b4930d0a Revert "Resolve: Key not found: fileSystemInfo when syncing shared folders"
This reverts commit e7267e597b.
2018-06-13 16:35:52 +10:00
abraunegg e7267e597b Resolve: Key not found: fileSystemInfo when syncing shared folders
* Resolve #11 where shared folders were unable to be sync'd due to fileSystemInfo data being within the remoteItem object
* Initial work on resolving #2, but fix not validated or complete
2018-06-09 21:43:39 +10:00
skilion fba3ed999e handle large uploads with parent id 2017-12-31 16:11:02 +01:00
skilion 305242d8a1 fix typo 2017-05-28 23:01:58 +02:00
skilion 738536736a Refactoring
- unified configs
- logging module
- new cmd line option to change the config dir
2016-08-04 23:43:10 +02:00
skilion 9b80d99ad4 support for files bigger than 100 MB and resumable uploads 2015-09-28 13:25:25 +02:00