From fd081be399592adfc064b6ca70b2f789a5a8982f Mon Sep 17 00:00:00 2001 From: Danny Gross Date: Sun, 7 Dec 2025 16:28:49 -0800 Subject: [PATCH] Fix upload failing due to subsecond timestamp precision Dropbox API rejects client_modified timestamps with microsecond precision. Truncate to whole seconds to fix silent upload failures. --- internal/dropbox/client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/dropbox/client.go b/internal/dropbox/client.go index 0cbadae..b981c3f 100644 --- a/internal/dropbox/client.go +++ b/internal/dropbox/client.go @@ -143,7 +143,8 @@ func (c *Client) Upload(path, content, mode string) (*files.FileMetadata, error) commitInfo.Mode = &files.WriteMode{Tagged: dropbox.Tagged{Tag: "add"}} } commitInfo.Autorename = true - now := time.Now().UTC() + // Truncate to seconds - Dropbox API doesn't accept subsecond precision + now := time.Now().UTC().Truncate(time.Second) commitInfo.ClientModified = &now reader := bytes.NewReader(data)