ishare

Example uploaders

Download an example, replace the placeholder values and double-click it to import it into ishare. See the specification for every option.

chibisafe

Download
{
  "name": "chibisafe",
  "requestURL": "https://chibisafe.moe/api/upload",
  "headers": { 
    "x-api-key": "API_KEY" 
  },
  "fileFormName": "file[]",
  "responseURL": "{{url}}",
  "deletionURL": "{{deleteUrl}}",
  "deleteRequestType": "DELETE"
}

copyparty

Download
{
  "name": "copyparty",
  "requestURL": "http://127.0.0.1:3923/screenshots/",
  "headers": {
    "pw": "VALUE",
    "accept": "json"
  },
  "fileFormName": "f",
  "responseURL": "{{files[0].url}}",
}

discord

Download
{
  "name": "discord",
  "requestURL": "WEBHOOK_URL",
  "formData": {
    "username": "ishare",
    "avatar_url": "https://raw.githubusercontent.com/castdrian/ishare/main/ishare/Util/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png"
  },
  "responseURL": "{{attachments[0].url}}"
}

dropbox

Download
{
  "name": "Dropbox",
  "uploaderType": "dropbox",
  "cloud": {
    "folder": "ishare",
    "pathTemplate": "{{date}}/{{filename}}",
    "directLink": false
  }
}

folder

Download
{
	"name": "folder",
	"uploaderType": "folder",
	"folder": {
		"path": "~/Sites/screenshots",
		"subfolderTemplate": "{{date}}",
		"publicURL": "https://example.com/screenshots/{{path}}"
	}
}

github

Download
{
  "name": "GitHub screenshots",
  "uploaderType": "github",
  "github": {
    "repository": "OWNER/screenshots",
    "branch": "main",
    "pathTemplate": "{{date}}/{{uuid}}.{{ext}}",
    "linkStyle": "markdown",
    "token": "github_pat_YOUR_FINE_GRAINED_TOKEN",
    "textAsGist": true,
    "publicGists": false
  },
  "imageOptimization": { "enabled": true, "format": "lossless" }
}

google-drive

Download
{
  "name": "Google Drive",
  "uploaderType": "googledrive",
  "cloud": {
    "folder": "ishare/Screenshots"
  }
}
{
  "name": "lumen",
  "requestURL": "http://localhost:8080/upload",
  "headers": {
    "x-api-key": "API_KEY"
  },
  "requestBodyType": "binary",
  "responseURL": "http://localhost:8080/{{id}}.{{ext}}?key={{key}}&nonce={{nonce}}",
  "deletionURL": "http://localhost:8080/{{id}}.{{ext}}/delete?key={{key}}&nonce={{nonce}}&api_key=API_KEY"
}

onedrive

Download
{
  "name": "OneDrive",
  "uploaderType": "onedrive",
  "cloud": {
    "folder": "Pictures/ishare"
  }
}

photos

Download
{
	"name": "photos",
	"uploaderType": "photos",
	"photos": {
		"album": "ishare"
	}
}
{
  "name": "s3",
  "uploaderType": "s3",
  "s3": {
    "endpoint": "https://s3.us-east-1.amazonaws.com",
    "region": "us-east-1",
    "bucket": "BUCKET_NAME",
    "accessKeyId": "ACCESS_KEY_ID",
    "secretAccessKey": "SECRET_ACCESS_KEY",
    "pathStyle": false,
    "keyTemplate": "{{date}}/{{uuid}}.{{ext}}",
    "acl": "public-read",
    "publicURL": "https://BUCKET_NAME.s3.us-east-1.amazonaws.com/{{key}}"
  }
}
{
  "name": "My server (SFTP)",
  "uploaderType": "sftp",
  "sftp": {
    "host": "files.example.com",
    "port": 22,
    "username": "deploy",
    "privateKey": "-----BEGIN OPENSSH PRIVATE KEY-----\nPASTE YOUR KEY HERE\n-----END OPENSSH PRIVATE KEY-----",
    "directory": "/var/www/i.example.com",
    "pathTemplate": "{{year}}/{{month}}/{{random}}.{{ext}}",
    "createDirectories": true,
    "publicURL": "https://i.example.com/{{path}}",
    "hostKeyFingerprint": "SHA256:REPLACE_WITH_ssh-keygen_-lf_OUTPUT"
  }
}

webdav

Download
{
  "name": "Nextcloud",
  "uploaderType": "webdav",
  "webdav": {
    "url": "https://cloud.example.com/remote.php/dav/files/USERNAME/ishare",
    "username": "USERNAME",
    "password": "APP_PASSWORD",
    "authentication": "basic",
    "pathTemplate": "{{date}}/{{uuid}}.{{ext}}",
    "createDirectories": true,
    "publicURL": "https://files.example.com/ishare/{{path}}"
  }
}

zipline

Download
{
	"name": "zipline",
	"requestURL": "https://your-zipline-host.com/api/upload",
	"headers": {
		"Authorization": "API_KEY",
	},
	"responseURL": "{{files[0].url}}",
	"fileFormName": "file",
	"viewCount": {
		"url": "https://your-zipline-host.com/api/user/files/{{files[0].id}}",
		"path": "views"
	}
}

zipline-cdn

Download
{
	"name": "zipline-cdn",
	"requestURL": "https://your-zipline-host.com/api/upload",
	"headers": {
		"Authorization": "API_KEY"
	},
	"responseURL": "{{files[0].url}}",
	"deletionURL": "{{files[0].removeUrl}}",
	"deleteRequestType": "GET",
	"fileFormName": "file",
	"linkRewrite": {
		"host": "cdn.example.com",
		"scheme": "https",
		"pathPrefix": "/i",
		"stripQuery": true
	},
	"autoDeleteAfterDays": 30
}

zipline-protected

Download
{
	"name": "zipline-protected",
	"requestURL": "https://your-zipline-host.com/api/upload",
	"headers": {
		"Authorization": "API_KEY",
	},
	"responseURL": "{{files[0].url}}",
	"fileFormName": "file",
	"linkOptions": {
		"password": {
			"field": "x-zipline-password",
			"location": "header"
		},
		"expiry": {
			"field": "x-zipline-deletes-at",
			"location": "header",
			"format": "iso8601",
			"template": "date={{value}}"
		}
	}
}