Skip to content

Commit f226d12

Browse files
committed
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.
1 parent 359260c commit f226d12

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

backend/pcloud/pcloud.go

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,12 +378,20 @@ func NewFs(ctx context.Context, name, root string, m configmap.Mapper) (fs.Fs, e
378378
return f, nil
379379
}
380380

381-
// OpenWriterAt opens with a handle for random access writes
381+
// XOpenWriterAt opens with a handle for random access writes
382382
//
383383
// Pass in the remote desired and the size if known.
384384
//
385-
// It truncates any existing object
386-
func (f *Fs) OpenWriterAt(ctx context.Context, remote string, size int64) (fs.WriterAtCloser, error) {
385+
// It truncates any existing object.
386+
//
387+
// OpenWriterAt disabled because it seems to have been disabled at pcloud
388+
// PUT /file_open?flags=XXX&folderid=XXX&name=XXX HTTP/1.1
389+
//
390+
// {
391+
// "result": 2003,
392+
// "error": "Access denied. You do not have permissions to perform this operation."
393+
// }
394+
func (f *Fs) XOpenWriterAt(ctx context.Context, remote string, size int64) (fs.WriterAtCloser, error) {
387395
client, err := f.newSingleConnClient(ctx)
388396
if err != nil {
389397
return nil, fmt.Errorf("create client: %w", err)

0 commit comments

Comments
 (0)