There several ways to upload a file from an external source to a CoCalc project.
This method is convenient if you can select the file to be uploaded with a mouse or other pointing device and drag it into a CoCalc browser tab.
We allow any size file in CoCalc, but the drag and drop file interface has a 256 MB limit on the size of the file that can be transferred. The other upload methods described below do not have this limit. There is however an overall file size limit for each project, see Project Upgrades.
- In the (+) New tab, click Create, then scroll down to the box that says “Drop files to upload” and drag and drop there.
- You can drag and drop right onto the Files listing. You have to drop the file onto some existing files in the Files listing (not below them).
Internet access must be enabled for your project for these methods to work.
- Open the (+) New tab, then paste a link where the filename would go and press return. This uses
wgetbehind the scenes.
curl -LO [url]in a terminal (.term file) or the mini-terminal (in Files tab).
This method uses the SSH protocol via
rsync from your computer’s operating system.
To get started, you need to create an SSH key pair, consisting of a public key and a private key, on your computer. Then install the public key in either your CoCalc account or a CoCalc project: Setup SSH keys.
Then use one of the options below in a command-line terminal on your computer to copy the file into your project. Exact command syntax may vary depending on your computer’s operating system.
For more information on setting up and using SSH with CoCalc, see this tutorial.
scp fromfile project:tofilefrom a command shell on your local computer.
rsync -aVH fromfile project:tofilefrom a command shell on your local computer.
project:tofile with the SSH remote address mentioned in the project settings and the target directory.
E.g. to upload a file
image.png into the home directory of your project, you would run:
scp image.png firstname.lastname@example.org:~
rsync image.png email@example.com:~
Here ‘large’ can mean anything from a few tens of megabytes to several gigabytes, whatever value at which uploads become a problem. The threshold may depend on local factors such as speed and quality of your internet connection.
- As noted above, there is a hard limit of 256 MB for the drag and drop interface. Use fetch or SSH methods above for larger files.
- Make sure your project has room for the files. Check in project Settings (wrench icon) → Project usage and quotas → Disk space.
- Avoid transferring large files if you can. Compress files before uploading, or divide into chunks.
Extra steps may be needed if you’re uploading a file from Google Drive.