mirror of
https://github.com/abraunegg/onedrive
synced 2026-03-14 14:35:46 +01:00
Fix Bug #3355: Fix that long running big upload (250GB+) fails because of an expired access token (#3361)
* Revert back to v2.5.5 performSessionFileUpload() and apply minimal change for upload session offset handling to prevent desynchronisation on large files * Add specific 403 handler for when the upload session URL itself expires * Add 'file_fragment_size' * Clean up debug logging output * Add 'tempauth' to spelling words * Update documentation URL's * Ensure that on each fragment upload, whilst the application is using the 'tempauth' for session upload, the global OAuth2 token needs to be checked for validity and refreshed if required * Add limit check for 'file_fragment_size' option * Add to default 'config' file * Update documentation for 'file_fragment_size' * Add 'file_fragment_size' to --display-config output * Add --file-fragment-size option to enable use via Docker option * Add to manpage * Update Docker entrypoint * Update Docker | Podman documentation * Update logging output to include connection method to URL * Update Upload Session URL expiry update to include UTC and LocalTime values * Update comment which was dropped / missed * Clarify that this is the OAuth2 Access Token * Clarify that the expiry timestamp is localTime * Update PR with dynamic use of fragment size if fileSize > 100MiB * Enforce multiple 320KiB for fragment size to align to Microsoft documentation * Fix Docker entrypoint and confirm working for ONEDRIVE_FILE_FRAGMENT_SIZE * Change 'defaultMaxFileFragmentSize' to 60 * Revise fragmentSize calculation to be as close to 60 MiB as possible without breaching Microsoft documented threshold
This commit is contained in:
parent
5ff8c01d3a
commit
ea7c3abd2d
11 changed files with 281 additions and 85 deletions
|
|
@ -29,6 +29,7 @@ Before reading this document, please ensure you are running application version
|
|||
- [drive_id](#drive_id)
|
||||
- [dry_run](#dry_run)
|
||||
- [enable_logging](#enable_logging)
|
||||
- [file_fragment_size](#file_fragment_size)
|
||||
- [force_http_11](#force_http_11)
|
||||
- [force_session_upload](#force_session_upload)
|
||||
- [inotify_delay](#inotify_delay)
|
||||
|
|
@ -412,6 +413,20 @@ _**CLI Option Use:**_ `--enable-logging`
|
|||
> [!IMPORTANT]
|
||||
> Additional configuration is potentially required to configure the default log directory. Refer to the [Enabling the Client Activity Log](./usage.md#enabling-the-client-activity-log) section in usage.md for details
|
||||
|
||||
### file_fragment_size
|
||||
_**Description:**_ This option controls the fragment size when uploading large files to Microsoft OneDrive. The value specified is in MB.
|
||||
|
||||
_**Value Type:**_ Integer
|
||||
|
||||
_**Default Value:**_ 10
|
||||
|
||||
_**Maximum Value:**_ 60
|
||||
|
||||
_**Config Example:**_ `file_fragment_size = "25"`
|
||||
|
||||
_**CLI Option Use:**_ `--file-fragment-size = '25'`
|
||||
|
||||
|
||||
### force_http_11
|
||||
_**Description:**_ This setting controls the application HTTP protocol version. By default, the application will use libcurl defaults for which HTTP protocol version will be used to interact with Microsoft OneDrive. Use this setting to downgrade libcurl to only use HTTP/1.1.
|
||||
|
||||
|
|
@ -871,6 +886,10 @@ _**Config Example:**_ `skip_size = "50"`
|
|||
|
||||
_**CLI Option Use:**_ `--skip-size '50'`
|
||||
|
||||
> [!NOTE]
|
||||
> This option is considered a 'Client Side Filtering Rule' and if configured, is utilised for all sync operations. After changing this option, you will be required to perform a resync.
|
||||
|
||||
|
||||
### skip_symlinks
|
||||
_**Description:**_ This configuration option controls whether the application will skip all symbolic links when performing sync operations. Microsoft OneDrive has no concept or understanding of symbolic links, and attempting to upload a symbolic link to Microsoft OneDrive generates a platform API error. All data (files and folders) that are uploaded to OneDrive must be whole files or actual directories.
|
||||
|
||||
|
|
|
|||
|
|
@ -290,6 +290,7 @@ docker run $firstRun --restart unless-stopped --name onedrive -v onedrive_conf:/
|
|||
| <B>ONEDRIVE_SYNC_SHARED_FILES</B> | Controls "--sync-shared-files" option. Default is 0 | 1 |
|
||||
| <B>ONEDRIVE_RUNAS_ROOT</B> | Controls if the Docker container should be run as the 'root' user instead of 'onedrive' user. Default is 0 | 1 |
|
||||
| <B>ONEDRIVE_SYNC_ONCE</B> | Controls if the Docker container should be run in Standalone Mode. It will use Monitor Mode otherwise. Default is 0 | 1 |
|
||||
| <B>ONEDRIVE_FILE_FRAGMENT_SIZE</B> | Controls the fragment size when uploading large files to Microsoft OneDrive. The value specified is in MB. Default is 10, Limit is 60 | 25 |
|
||||
|
||||
### Environment Variables Usage Examples
|
||||
**Verbose Output:**
|
||||
|
|
|
|||
|
|
@ -305,6 +305,7 @@ podman run -it --name onedrive_work --user "${ONEDRIVE_UID}:${ONEDRIVE_GID}" \
|
|||
| <B>ONEDRIVE_SYNC_SHARED_FILES</B> | Controls "--sync-shared-files" option. Default is 0 | 1 |
|
||||
| <B>ONEDRIVE_RUNAS_ROOT</B> | Controls if the Docker container should be run as the 'root' user instead of 'onedrive' user. Default is 0 | 1 |
|
||||
| <B>ONEDRIVE_SYNC_ONCE</B> | Controls if the Docker container should be run in Standalone Mode. It will use Monitor Mode otherwise. Default is 0 | 1 |
|
||||
| <B>ONEDRIVE_FILE_FRAGMENT_SIZE</B> | Controls the fragment size when uploading large files to Microsoft OneDrive. The value specified is in MB. Default is 10, Limit is 60 | 25 |
|
||||
|
||||
### Environment Variables Usage Examples
|
||||
**Verbose Output:**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue