Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resty not loading in Shell #83

Open
bewheele opened this issue Apr 27, 2018 · 1 comment
Open

Resty not loading in Shell #83

bewheele opened this issue Apr 27, 2018 · 1 comment

Comments

@bewheele
Copy link

I'm following the git instructions, but I am unable to successfully load resty in the shell on a Mac. I wanted to ask if I'm mis-understanding the source syntax

When trying to execute the following script, it seems resty takes no action (there are no errors being thrown on the target server), nor in the Terminal

I've installed resty via the git install method. The same POST command works on a single file I execute in the shell via resty (so I know resty is correctly added to my Path, and I know the command syntax is good...)

Also - the script below works to upload all files in the referenced folder if I replace the resty line with a curl command - it's just the resty source part that seems not to work.

Any help appreciated - I'd much prefer resty to using straight curl syntax!

#!/bin/bash
dir="/Users/bewheele/Downloads/Images"
 for file in `find $dir -type f`
  do
  filename=`basename $file`;
  echo $file
   # Load resty, don't write to the history file, and set the URI base
  . /Users/bewheele/resty -W 'http://localhost:4504 -u admin:admin' POST /api/assets/myfolder/* -F"name=$filename" -F"file=@$file"
done
@hassanfarid
Copy link

Try to expand aliases in the shell.
This works for me.

#!/bin/bash
shopt -s expand_aliases

Ref: #87

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants