Configuration
Initialize a files_sdk.Config with Init() and pass it to each resource client.
The configuration controls authentication, the API endpoint, workspace scoping,
and HTTP behavior for that client.
Configuration Options
Base URL
Set this to the full https:// URL of your Files.com subdomain (e.g. https://MY-SUBDOMAIN.files.com).
This is not required in most cases, but one benefit of setting it is that it ensures that authentication failures will be logged to your site's API logs. Without setting this, we won't know which site to associate the authentication failure with, and it won't be logged to your site's API logs.
This is always required if your site is configured to disable global acceleration.
This can also be set to use a mock server in development or CI.
Diagnostic Logging
Set Config.Debug to true, or set the FILES_SDK_DEBUG environment variable
to a non-empty value, to enable detailed SDK request and response diagnostics.
Provide Config.Logger to receive the output. The default logger discards it.
These DEBUG diagnostics can include signed URLs, API keys, session IDs, headers,
and payloads.
SDK retry entries at INFO, WARN, and ERROR redact request URLs and credentials,
even when debug mode is enabled. A logger with levels controls which retry DEBUG
entries it displays. For a logger that only implements Printf, debug mode
controls whether retry DEBUG entries are emitted.