Skip to content

Resty not loading in Shell #83

Open
@bewheele

Description

@bewheele

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions