Comments (3)
Hi @TheCrazyT please see the documentation on how to upload: https://github.com/tomgross/pcloud/blob/master/README.rst#uploading-files
from pcloud.
I was more interested in appending data to existing files (so I needed to use "opener.open_fs" with append-flag).
Thats why i was not able to use "uploadfile".
As mentioned before the fd-param does not get set.
Although this is fine with "normal" uploads, it won't work if you use "pcloudfs".
But I got around the bug by patching the code by commands.
Btw:
The commands I used for patching are:
sed -i 's/kwargs.pop("fd", None)/fd=kwargs.pop("fd", None)/' pcloud/api.py
sed -i 's/self.endpoint + method, data=m, headers={"Content-Type": m.content_type}/self.endpoint + method + f"?fd=\{fd\}", data=m, headers=\{"Content-Type": m.content_type\}/' pcloud/api.py
(I'm using those commmands in a jupyter notebook ... therefore was not able to edit the files by hand)
Not shure if fd needs to be a query-parameter or can be a POST-parameter (can't remember if I tried as POST-param and it didn't work)
from pcloud.
Fixed with 1.3 https://pypi.org/project/pcloud/1.3/
from pcloud.
Related Issues (20)
- (Feature Request) Create folders that do not exist HOT 1
- Sync folders between pcloud and local drive HOT 1
- Downloading a file. HOT 1
- When trying to use 'listtokens' I get error 1000 'Login is required' HOT 12
- help me in c# HOT 1
- cannot use folderid with uploadfile method HOT 1
- share file HOT 1
- Need help on file download from Pcloud to Local Directory. HOT 4
- Passing list to pc.uploadfile gives exception HOT 1
- Why is your github package called pycloud but your installed package is named pcloud? HOT 4
- Saving the auth code token between oauth2 calls. HOT 1
- Can't share uploaded file with expiration shared link HOT 4
- I can't upload files HOT 2
- async file upload HOT 2
- Endpoint with opener?
- How to avoid 2FA authentication each time when polling photos with 1 hour interval ? HOT 4
- Option of downloading from pcloud URLs HOT 1
- getpublinkdownload
- Implement the "search" API
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pcloud.