Document workaround for ACD maximum file size.

Document workaround for ACD maximum file size and display a warning in verbose mode before upload starts.

Fixes #215.
This commit is contained in:
klauspost 2016-01-04 13:23:33 +01:00 committed by Nick Craig-Wood
parent 3c31d711b3
commit 4ce2a84df0
2 changed files with 16 additions and 0 deletions

View file

@ -39,6 +39,7 @@ const (
statusAvailable = "AVAILABLE"
timeFormat = time.RFC3339 // 2014-03-07T22:31:12.173Z
minSleep = 20 * time.Millisecond
warnFileSize = 50 << 30 // Display warning for files larger than this size
)
// Globals
@ -440,6 +441,9 @@ func (f *Fs) Put(in io.Reader, remote string, modTime time.Time, size int64) (fs
if err != nil {
return nil, err
}
if size > warnFileSize {
fs.Debug(f, "Warning: file %q may fail because it is too big. Use --max-size=%dGB to skip large files.", remote, warnFileSize>>30)
}
folder := acd.FolderFromId(directoryID, o.fs.c.Nodes)
var info *acd.File
var resp *http.Response