Is there a way to add folders with safe commands in a container?

hello maidsafe

is there a way to add a folder in a container?

Neik has made a script where he puts each file one by one but doesnt work with folders because I think there is no command to add a folder in a container?

here is the script:

you run safe keys create --for-cli

make a upload.sh script somewhere in PATH

then chmod u+x upload.sh

then put in the script:

#!/usr/bin/env bash

echo "Contanor contents" > ./uploads.txt

CONTAINER=$(safe files put ./uploads.txt | grep -o -P '(?<=").*(?=\?)')

for file in ./*
do
  SAFE_URL=$(safe files add -f "$file" $CONTAINER)
  echo "$SAFE_URL"
  echo "$SAFE_URL" >> ./uploads.txt
sleep 1
done
echo "Upload complete" >> ./uploads.txt
3 Likes

This topic was automatically closed after 60 days. New replies are no longer allowed.