Files upload to shared folder using private link
neildonnell opened this issue · comments
Hi,
Nice program, thank you for the considerable work you have done on this.
I have run into a problem trying to upload a file to a AOC folder that is shared with me (link).
I always seem to get the error: ERROR: Other: do not use both link and url options
This is an example of the command I try and use:
ascli aoc files upload --workspace=ipl-test --to-folder=/ #2871FFD.jpg --link=test
I've tried many forms of formatting, it seems as soon as I use --link to access a share I get the error.
Is this a bug or can you assist?
Thank you.
Effectively,
AoC provides a few ways to Authenticate/Authorize (all based on OAuth 2): web, jwt, public_link
jwt
is what is typically used, together with a private key, and requires an account.public_link
is an anonymous, and just the link has it all: AoC instance URL and authorization.
Currently (4.14) option link
accepts only public links, but not private links.
public links bear a an authorization, while private links require authentication.
So, the question is: is the link you use a public or private link ?
If it's a public link, it can work, but you cannot provide both the authentication and public link authorization, hence the error.
Maybe you have a default preset defined.
To tell ascli
to not load a default preset, add option -N
(no default).
If it's a private link, well you will have to wait for a future release.
I will look at adding private link support ..
Note that private links do not bear the authorization, so most probably the JWT auth will be needed.
a beta is available here:
https://ibm.biz/aspera-cli-beta
to try: download that link, install with : gem install aspera-cli-beta.gem
then in this version, there is no option link
, it's now just url
, provide the private link there.
it will require a private key, like usual auth.
If you get the private link, you can retrieve the folder name, it is displayed when doing a browse
.
Or you can also do:
ascli aoc files show / --fields=name --url=https://privatelinkhere --display=data
Then, if you want your scripts to use only that name, you can create a preset with the link:
ascli conf preset set myfoldername url https://private_link
Then, you can simply use that link with option -Pmyfolder
You can also prefix the preset with some fixed prefix, like priv_
, example:
privlink=https://privlinkhere
prefix=priv_
foldername=$(ascli aoc files show / --fields=name --url=$privlink --display=data)
ascli conf preset set $prefix$foldername url $privlink
Now you can use the folder name without the url:
ascli aoc files browse / -P$prefix$foldername
Also, an admin can list all short links like this:
ascli aoc admin res short_link list --fields=ALL
You can try this beta:
https://ibm.biz/aspera-cli-beta
It adds support for "no workspace", i.e. shared folders only. For that specify option : --workspace=@json:null
. (or equivalent: --workspace=@ruby:nil
)
Neil,
concerning the logs, they seem ok, just async
is showing that it scans and does not find differences.
Else, did you check the beta ?