Coder Social home page Coder Social logo

Comments (4)

tomgross avatar tomgross commented on June 30, 2024

The purpose of the downloadfile-method is to retrieve the metadata from a download (share) link. What you want probably is to download file contents, which can be achived by the file ops API (https://docs.pcloud.com/methods/fileops/index.html)

Here is a minimal example:

In [7]: pc.file_open(path='/somefile.txt', flags=api.O_CREAT)
Out[7]: {'result': 0, 'fd': 1, 'fileid': 2046546721}
In [8]: pc.file_size(fd=1)
Out[8]: {'result': 0, 'size': 238, 'offset': 0}
In [9]: pc.file_read(fd=1, count=238)
Out[9]: b'Some Content'

from pcloud.

qo4on avatar qo4on commented on June 30, 2024

How do you download multiple files? Run the same code in parallel for a list of paths? Or consistently? Is there a function that expects a list of paths or a list of fileid's?

from pcloud.

monish0612 avatar monish0612 commented on June 30, 2024

Can someone help me download a file from Pcloud to my local directory? I have attached the code snippet. Please help ASAP. I have attached the screenshot.
Uploading 2022-11-10_184949.jpg


from pcloud.

monish0612 avatar monish0612 commented on June 30, 2024

Code Snippet:

pc = PyCloud('emailid', 'password', endpoint='eapi')

pc.downloadfile(url="File Download Link", path="Local Directory")

from pcloud.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.