dropbox: fix public link by removing expires parameter

Adding the expires parameter gives settings_error/not_authorized/.. errors.

The expires setting isn't in the documentation so this commit removes
it for now.
This commit is contained in:
Nick Craig-Wood 2020-06-18 18:40:33 +01:00
parent 85bcacac90
commit df9c930581

View file

@ -787,9 +787,12 @@ func (f *Fs) PublicLink(ctx context.Context, remote string, expire fs.Duration,
fs.Debugf(f, "attempting to share '%s' (absolute path: %s)", remote, absPath) fs.Debugf(f, "attempting to share '%s' (absolute path: %s)", remote, absPath)
createArg := sharing.CreateSharedLinkWithSettingsArg{ createArg := sharing.CreateSharedLinkWithSettingsArg{
Path: absPath, Path: absPath,
Settings: &sharing.SharedLinkSettings{ // FIXME this gives settings_error/not_authorized/.. errors
Expires: time.Now().Add(time.Duration(expire)), // and the expires setting isn't in the documentation so remove
}, // for now.
// Settings: &sharing.SharedLinkSettings{
// Expires: time.Now().Add(time.Duration(expire)).UTC().Round(time.Second),
// },
} }
var linkRes sharing.IsSharedLinkMetadata var linkRes sharing.IsSharedLinkMetadata
err = f.pacer.Call(func() (bool, error) { err = f.pacer.Call(func() (bool, error) {