Skip to content
TheChatArchiveThe Chat Archive
gpt-3.5-turbo-0125· OpenAIAi2 WildChat-4.8M (AI2)

A code snippet to send files through curl in a loop that goes through files that match…

  1. User

    A code snippet to send files through curl in a loop that goes through files that match the pattern use curl -X POST ‘https://store1.gofile.io/contents/uploadfile’ -H “Authorization: Bearer your_token” -F “file=@file.txt”

  2. Assistant

    #!/bin/bash

    TOKEN="your_token" UPLOAD_URL="https://store1.gofile.io/contents/uploadfile"

    for file in /path/to/files/*.txt; do curl -X POST UPLOADURL−H"Authorization:BearerUPLOAD_URL -H "Authorization: Bearer TOKEN" -F "file=@$file" done