Maximum file size: 100MB
Slop.sh is a service that allows you to programmatically or manually upload files that will be available for 7 days. Files are automatically deleted after expiration. Free and open source, forever.
curl -F "[email protected]" https://api.slop.sh/upload
curl -O https://api.slop.sh/f/YOUR_FILE_ID
import requests files = {'file': open('local-file.txt', 'rb')} response = requests.post('https://api.slop.sh/upload', files=files) file_url = response.json()['url']
package main import ( "bytes" "io" "mime/multipart" "net/http" "os" ) func main() { file, _ := os.Open("local-file.txt") defer file.Close() body := &bytes.Buffer{} writer := multipart.NewWriter(body) part, _ := writer.CreateFormFile("file", "local-file.txt") io.Copy(part, file) writer.Close() req, _ := http.NewRequest("POST", "https://api.slop.sh/upload", body) req.Header.Set("Content-Type", writer.FormDataHeader()) client := &http.Client{} resp, _ := client.Do(req)
{ "id": "Ax7b9q", "url": "https://api.slop.sh/f/Ax7b9q", "expires": "2024-01-11T15:04:05Z" }