mirror of
https://github.com/rclone/rclone.git
synced 2025-06-21 04:08:02 +02:00
pcloud: fix "Access denied. You do not have permissions to perform this operation" on large uploads
The API we use for OpenWriterAt seems to have been disabled at pcloud PUT /file_open?flags=XXX&folderid=XXX&name=XXX HTTP/1.1 gives { "result": 2003, "error": "Access denied. You do not have permissions to perform this operation." } So disable OpenWriterAt and hence multipart uploads for the moment.
This commit is contained in:
parent
359260c49d
commit
f226d12a2f
@ -378,12 +378,20 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
|
|||||||
return f, nil
|
return f, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// OpenWriterAt opens with a handle for random access writes
|
// XOpenWriterAt opens with a handle for random access writes
|
||||||
//
|
//
|
||||||
// Pass in the remote desired and the size if known.
|
// Pass in the remote desired and the size if known.
|
||||||
//
|
//
|
||||||
// It truncates any existing object
|
// It truncates any existing object.
|
||||||
func (f *Fs) OpenWriterAt(ctx context.Context, remote string, size int64) (fs.WriterAtCloser, error) {
|
//
|
||||||
|
// OpenWriterAt disabled because it seems to have been disabled at pcloud
|
||||||
|
// PUT /file_open?flags=XXX&folderid=XXX&name=XXX HTTP/1.1
|
||||||
|
//
|
||||||
|
// {
|
||||||
|
// "result": 2003,
|
||||||
|
// "error": "Access denied. You do not have permissions to perform this operation."
|
||||||
|
// }
|
||||||
|
func (f *Fs) XOpenWriterAt(ctx context.Context, remote string, size int64) (fs.WriterAtCloser, error) {
|
||||||
client, err := f.newSingleConnClient(ctx)
|
client, err := f.newSingleConnClient(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("create client: %w", err)
|
return nil, fmt.Errorf("create client: %w", err)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user