Upload Files
You have several options to upload files to the newly created file repository:
Upload files in Space
Open the Packages page and select the required file repository.
Open the repository and click Upload.
In the Upload Files window, in Target directory, specify the path to the target directory, e.g.
my-files/text-files
. To upload files to the repository root, leave Target directory blank.Use the field below to add one or more files.
Click Upload.
Upload files using command-line tools
Typically, you should specify a local file path (e.g.
/tmp/text/file1.txt
orc:\text\file1.txt
), the repository URL including a target directory (e.g.,my-files/text-files
), and a permanent access token.author
anddescription
parameters are optional. For example:curl -i -H "Authorization: Bearer abc1234" -F author="John Doe" -F description="My text file" -F file=@"/tmp/text/file1.txt" https://files.pkg.jetbrains.space/mycompany/p/my-project/filesrepo/my-files/text-files$Uri = 'https://files.pkg.jetbrains.space/mycompany/p/my-project/filesrepo/my-files/text-files/file1.txt'; $Headers = @{'Authorization'='Bearer abc1234'}; $Form = @{ author = 'John Doe' description = 'My text file' file = Get-Item -Path 'c:\text\file1.txt' } Invoke-RestMethod -Uri $Uri -Method Post -Headers $Headers -Form $Form;
Upload files using Space Automation
For details, refer to the Space Automation examples.
Last modified: 07 March 2023