How to set up ShareX custom uploader

“`html
ShareX is one of those utility applications that, once you start using it, you wonder how you ever managed without it. It’s a free, open-source program for Windows that lets you capture or record any selected area of your screen with a single hotkey, then automatically upload it to over 80 different destinations. While many users are perfectly happy with the default options like Imgur for images or Gfycat for GIFs, the true power of ShareX lies in its extensibility – specifically, its custom uploader capabilities. This is where you can truly tailor the application to your specific workflow, integrating it with private servers, obscure image hosts, or even internal company tools.
Think about it: you snap a screenshot, and instead of manually opening a browser, navigating to a site, uploading the file, and then copying the link, ShareX does it all in a fraction of a second. But what if you need that file on a cloud storage service that isn’t pre-configured? Or perhaps you’re a developer who wants to push a quick code snippet to a specific pastebin service that’s part of your daily routine? That’s precisely why mastering the ShareX custom uploader setup is such a game-changer. It transforms a powerful tool into an indispensable one, allowing you to automate tasks that would otherwise eat into your precious time and focus. We’re talking about streamlining your digital life, making everything from bug reporting to sharing personal memories incredibly efficient.
1. Understanding the Custom Uploader Interface: The Gateway to Automation
Before you can build your digital automation empire with ShareX, you need to understand the control panel. When you launch ShareX, you’ll see a main window with a sidebar. Navigate to ‘Destinations’ and then ‘Custom uploaders’. This section is your canvas. Here, you can add, edit, or remove custom uploaders. Each custom uploader configuration is essentially a set of instructions that tells ShareX how to interact with a remote server or service to upload your files.
The interface itself might look a little intimidating at first glance, with fields like ‘Request URL’, ‘Method’, ‘Body’, ‘Headers’, and ‘URL/Image URL/Deletion URL’. But don’t fret; each of these plays a specific role in how ShareX communicates with the target service. ‘Request URL’ is the endpoint where your file will be sent. ‘Method’ defines the HTTP method (GET, POST, PUT, etc.) used for the request. ‘Body’ specifies how the file data is sent, often as ‘Multipart/form-data’ for file uploads. ‘Headers’ allow you to include authentication tokens or other necessary information. Understanding these core components is the first step to a successful ShareX custom uploader setup.
Deep Dive into Interface Fields: What Each Setting Means
Let’s break down those seemingly complex fields in the custom uploader interface. Getting a solid grasp on these will save you a lot of head-scratching later. Think of them as the building blocks of your communication with the server.
- Request URL: This is the most critical piece. It’s the exact web address (endpoint) where ShareX will send your file or request. If you’re uploading to a PHP script, it’s the URL of that script. If it’s an API, it’s the specific API endpoint for uploads. A common mistake is forgetting `https://` or having a trailing slash where one isn’t needed, so double-check this against your service’s documentation.
- Method: This defines the HTTP action ShareX performs.
POST: Most common for sending data (like files) to a server to create a new resource.PUT: Often used for updating an existing resource, or creating one at a specific URL.GET: Primarily for retrieving data. Less common for uploads, but might be used for specific API calls before an upload.DELETE: For removing a resource. This is usually tied to the ‘Deletion URL’ field.
- Body: This dictates how the data (your file and any other parameters) is packaged and sent.
Multipart/form-data: Essential for file uploads. It allows you to send binary data (your image/video) along with other text fields in a single request. You’ll specify a ‘File field name’ here.x-www-form-urlencoded: Used for sending simple key-value pairs, similar to what you’d see in a web form submission. No file data.Raw: For sending data in a custom format, like JSON or XML. You’d manually type out the body content, often using placeholders.
- Headers: These are additional pieces of information sent with the request, not part of the main data body. They’re like sticky notes attached to a package, providing context. Common headers include:
Authorization: Bearer YOUR_API_TOKEN: For authenticating your request with an API.Content-Type: application/json: Informs the server that the body contains JSON data.User-Agent: ShareX/13.x.x: Identifies the client making the request.
Many services require API keys or tokens in headers for security.
- URL/Image URL/Deletion URL: These are crucial for parsing the server’s response. After ShareX sends your file, the server typically replies with a message, often a JSON object, containing the public URL of your uploaded file.
- URL: The general link to the uploaded content.
- Image URL: Specifically for images, if the service provides a direct image link (e.g., for embedding).
- Deletion URL: If the service provides a way to delete the uploaded content later, this is where you’d extract that specific URL or token.
You’ll use JSONPath or regular expressions here to tell ShareX exactly where to find these links within the server’s response.
2. Simple HTTP File Upload: Your First ShareX Custom Uploader Setup
Let’s start with a foundational example: uploading a file to a basic HTTP server that accepts POST requests. This is perhaps the most common scenario for custom uploaders. Imagine you have a simple web server running on your local network, or a web hosting account that provides a specific PHP script for file uploads. Your ShareX custom uploader setup for this would involve specifying the script’s URL as the ‘Request URL’ and selecting ‘POST’ as the ‘Method’.
For the ‘Body’ setting, you’ll typically choose ‘Multipart/form-data’ and then add a ‘File field name’. This field name needs to match what your server-side script expects (e.g., ‘file’, ‘upload’, ‘image’). ShareX will then automatically send your captured image or video as part of this multipart form. The server responds with some data, and ShareX needs to know how to extract the public URL of the uploaded file from that response. This is where ‘URL’, ‘Image URL’, and ‘Deletion URL’ fields come in, often using JSONPath or regular expressions to parse the server’s reply. For a simple server, the response might be plain text containing just the URL, making extraction straightforward.
Example: Uploading to a Basic PHP Script
Let’s walk through a concrete example. Suppose you have a PHP script named upload.php on your web server at https://yourdomain.com/upload.php. This script expects a file named ‘image’ and returns the public URL in plain text.
Your upload.php might look something like this (very basic, no error handling for brevity):
<?php
$target_dir = "uploads/";
$target_file = $target_dir . basename($_FILES["image"]["name"]);
move_uploaded_file($_FILES["image"]["tmp_name"], $target_file);
echo "https://yourdomain.com/" . $target_file;
?>
In ShareX, your custom uploader settings would be: (See: Understanding screen capture technology.)
- Request URL:
https://yourdomain.com/upload.php - Method:
POST - Body:
Multipart/form-data- File field name:
image(this matches$_FILES["image"]in the PHP script)
- File field name:
- URL:
$response$(since the script returns the URL as plain text, ShareX will just use the entire response) - Image URL:
$response$(same as above)
This setup is simple, effective, and forms the basis for understanding more complex API integrations.
3. Integrating with FTP/SFTP Servers: Private Storage and Control
While HTTP uploads are common, many users, especially developers and IT professionals, prefer direct FTP or SFTP access for their files. ShareX handles this beautifully, though the ShareX custom uploader setup for FTP/SFTP is slightly different from HTTP. Instead of configuring a custom uploader, you’ll find these options directly under ‘Destinations’ -> ‘File Uploader Settings’. Here, you can specify multiple FTP, SFTP, or FTPS accounts.
You’ll need to provide the server hostname, port, username, and password. Crucially, you can also define a ‘Remote path’ where files will be uploaded and a ‘URL’ path that corresponds to the web-accessible location of that remote path. For instance, if your FTP uploads go to `/public_html/uploads/` and your website is `example.com`, your URL path might be `https://example.com/uploads/`. Once configured, ShareX treats these FTP/SFTP destinations just like any other, allowing for seamless uploads directly to your private storage infrastructure, giving you full control over your data.
Security Considerations for FTP/SFTP
It’s important to differentiate between FTP, FTPS, and SFTP. Each offers different levels of security:
- FTP (File Transfer Protocol): The oldest and least secure. Data, including usernames and passwords, is transmitted in plain text, making it vulnerable to eavesdropping. Generally, you should avoid using plain FTP unless absolutely necessary for legacy systems within a secure, isolated network.
- FTPS (FTP Secure): Adds an SSL/TLS layer to FTP. This encrypts the control and/or data connections, making it much more secure than plain FTP. There are two modes: explicit (client requests encryption) and implicit (encryption starts immediately). ShareX typically supports explicit FTPS.
- SFTP (SSH File Transfer Protocol): Not related to FTP, despite the similar name. SFTP runs over the SSH (Secure Shell) protocol, providing a secure, encrypted channel for file transfer, command execution, and authentication. It’s generally considered the most secure option for file transfers and is widely preferred for its robust encryption and authentication mechanisms.
When setting up ShareX, always opt for SFTP or FTPS if your server supports it. Using plain FTP for sensitive data, or any data accessible over the public internet, is a significant security risk. Make sure your server’s firewall is also configured correctly to only allow connections from trusted IPs if possible, or at least to limit brute-force attempts.
4. Leveraging APIs with JSON Parsing: Advanced ShareX Custom Uploader Setup
Many modern services expose their functionality through RESTful APIs that communicate using JSON. This is where the ShareX custom uploader setup truly shines for power users. Suppose you want to upload an image to a service like Cloudinary, a custom enterprise asset management system, or even a self-hosted solution like Nextcloud or Owncloud that offers an API. You’ll typically need to send your file along with some authentication headers and perhaps other parameters in the request body.
The process usually involves setting the ‘Method’ to ‘POST’ or ‘PUT’, the ‘Body’ to ‘Multipart/form-data’, and adding necessary ‘Headers’ such as `Authorization: Bearer YOUR_API_KEY`. The server will then respond with a JSON object containing various details about the uploaded file, including its public URL. In ShareX, you’d use JSONPath expressions in the ‘URL’, ‘Image URL’, and ‘Deletion URL’ fields to extract the relevant data. For example, if the response is `{“data”: {“url”: “https://yourhost.com/image.png”}}`, your JSONPath for ‘URL’ would be `$.data.url`. This capability opens up integration with virtually any web service that provides an upload API.
JSONPath and Regular Expressions: Your Data Extraction Tools
Mastering JSONPath and regular expressions (regex) is key to fully utilizing ShareX’s API integration capabilities. Most modern APIs return JSON, so JSONPath is your primary tool. Regular expressions are more flexible and can be used for parsing non-JSON responses or extracting specific parts of a string. Here’s a quick primer:
JSONPath Examples:
$: The root element of the JSON structure.$.propertyName: Accesses a property directly under the root. E.g., for{"url": "link"}, use$.url.$.data.url: Accesses a nested property. E.g., for{"data": {"url": "link"}}, use$.data.url.$.items[0].link: Accesses the ‘link’ property of the first item in an array called ‘items’.
The ShareX interface for JSONPath is quite intuitive. You’ll simply type your path directly into the ‘URL’ or ‘Image URL’ field. The built-in ‘Test’ button in the custom uploader window is incredibly helpful here – paste a sample server response and test your JSONPath to ensure it extracts the correct URL.
Regular Expression Examples:
Regex is more powerful but also more complex. You’d use it if the server response isn’t clean JSON, or if you need to extract a URL embedded within a larger text string. In ShareX, you’d preface your regex with regex:.
regex:"(https?:\/\/[^\s"]+)": This would capture any URL (starting with http or https) enclosed in double quotes. The parentheses create a capture group, and ShareX typically uses the first capture group.regex:url=(.*?)&: If your response was something likesuccess=true&url=https://example.com/file.png&id=123, this would capture the URL after “url=”.
When using regex, be specific. Test your regex on an online regex tester with sample responses from your target API to ensure it matches exactly what you need.
5. Scripting with Arguments and Placeholders: Dynamic Uploads
ShareX isn’t just about static configurations; it also supports dynamic input through arguments and placeholders. This is particularly useful for advanced ShareX custom uploader setup scenarios where you need to pass dynamic information to your custom uploader, such as a filename, timestamp, or even user input. Within the custom uploader settings, you can define arguments that ShareX will prompt you for, or use built-in placeholders like `{filename}`, `{clipboardtext}`, or `{date}`. (See: Ergonomics and screen use.)
For example, you might create a custom uploader that uploads a file to a specific folder on an SFTP server, and you want to be prompted for the folder name. You could add an argument like `folderName` and then use `{folderName}` in your ‘Remote path’ for the SFTP configuration. Or, for an HTTP upload, you might want to include the current date in the uploaded filename to prevent collisions, using `{date:yyyyMMdd_HHmmss}_{filename}`. This level of customization allows for incredibly flexible workflows, letting you adapt your uploads to specific contexts on the fly without changing the underlying configuration.
Leveraging Built-in Placeholders for Enhanced Workflows
ShareX’s placeholders are incredibly versatile and can be used in almost any text field within your custom uploader, from the ‘Request URL’ to ‘Headers’ to ‘Body’ parameters. Here are a few more popular ones and their uses: See also favorite screen capture apps.
{filename}: The original filename of the captured content (e.g.,screenshot.png).{filename:random}: Generates a random string as the filename. Useful for preventing filename collisions on the server.{filename:random:10}: Generates a random string of 10 characters.{date:yyyyMMdd_HHmmss}: The current date and time formatted in a specific way. Great for chronological organization or unique filenames.{input}: If you’re using a custom uploader for URL shortening, this holds the URL ShareX is trying to shorten.{clipboardtext}: The current text content of your clipboard. Useful for sending text snippets to pastebins.{prompt:Your message here}: Displays a dialog box asking the user for input. The entered text will then replace this placeholder. This is how you’d get dynamic folder names or custom notes.{response}: The full raw response from the server after an upload. Mostly used for debugging.
By combining these, you can create highly specialized upload routines. Imagine a workflow where you capture a region, ShareX prompts you “Enter project name:”, and then uploads the image to https://yourserver.com/uploads/{prompt:project name}/{filename}, simultaneously adding a custom header X-Project-Tag: {prompt:project name}. This level of dynamic interaction drastically reduces manual effort.
6. Setting Up Custom URL Shorteners: Taming Long Links
Beyond file uploads, ShareX also excels at URL shortening. While many default shorteners are available, a ShareX custom uploader setup for your own URL shortener provides privacy, branding, and consistency. This is especially valuable if you run your own shortener service (like Polr, Kutt, or even a custom script) or if your organization uses a specific internal one. The process is similar to file uploads but focuses on sending a URL instead of a file.
You’ll configure a ‘Request URL’ for your shortener’s API endpoint, typically with a ‘Method’ of ‘POST’. In the ‘Body’, you’ll send the long URL, often as a form field like `url= {input}` (where `{input}` is the placeholder for the URL ShareX wants to shorten). Headers might include API keys for authentication. The response from your shortener will contain the shortened URL, which you’ll extract using JSONPath or regex. Once set up, you can tell ShareX to automatically shorten URLs copied to your clipboard, or even shorten the URL of an uploaded file, creating a super-efficient sharing pipeline.
Popular Self-Hosted URL Shortener Services
For those looking to maintain full control and branding, self-hosting a URL shortener is a great option. Here are a couple of popular choices that integrate well with ShareX:
- Polr: An open-source, modern, and user-friendly URL shortener that you can host on your own server. It provides a clean interface and an API, making it a strong candidate for ShareX integration. Its API typically requires a POST request with the long URL and an API key.
- Kutt: Another popular open-source URL shortener with a focus on speed and modern design. Kutt also offers a robust API, often involving a JSON payload for the long URL and an API key in the headers.
When setting these up, always refer to their specific API documentation. The ‘Request URL’, ‘Method’, ‘Headers’, and the expected ‘Body’ format will vary slightly. The key is to correctly parse the JSON response from these services to extract the shortened URL using JSONPath, similar to how you would for image uploads.
7. Post-Upload Actions and Workflows: The Full Automation Loop
The beauty of ShareX isn’t just in the upload itself, but in what happens *after* the upload. This is where post-upload actions and workflows come into play, significantly extending the utility of your ShareX custom uploader setup. After a successful upload, ShareX can perform a variety of actions: copy the URL to your clipboard, open the URL in your browser, show a notification, or even run a custom command. You can find these options under ‘After upload tasks’.
For instance, if you upload an image to your custom server, you might want ShareX to automatically copy the resulting URL to your clipboard and then open it in your default web browser for immediate verification. Or, for a more advanced scenario, you could configure it to run a custom command that triggers a Slack notification or updates a project management ticket with the new link. By chaining these actions, you can create incredibly powerful, multi-step workflows that turn a simple screenshot into a fully integrated part of your daily operations, saving countless clicks and mental overhead.
Chaining Actions for Maximum Efficiency
Let’s consider a few practical examples of chaining ‘After upload tasks’ to build sophisticated workflows: (See: Impact of screen time on mental health.)
- Developer Bug Report:
You capture a screenshot of a bug. ShareX uploads it to your private server.
After upload tasks:Copy URL to clipboardOpen URL(to quickly review the uploaded image)Run command: C:\Path\To\Script\slack_webhook.bat {url} {prompt:Bug description}(This script could send a Slack notification to your team with the image URL and a description you typed in a prompt.)Run command: C:\Path\To\Script\jira_create_ticket.exe {url} {clipboardtext}(Another script to create a Jira ticket, passing the image URL and perhaps the previous prompt’s description if it was copied to clipboard.)
- Quick Sharing to Social Media (via custom script):
You capture a funny meme. ShareX uploads it to your custom image host.
After upload tasks:Copy URL to clipboardRun command: C:\Path\To\Script\post_to_twitter.py {url} {prompt:Tweet text}(A Python script that uses the Twitter API to post the image with a custom tweet message.)
- Automated Documentation Update:
You capture a new UI element for documentation. ShareX uploads it to your internal wiki’s image server.
After upload tasks:Copy URL to clipboardRun command: C:\Program Files\Notepad++\notepad++.exe C:\Path\To\Documentation\index.md(Opens your markdown documentation file, where you can paste the new image URL, saving you from manually navigating to the file.)
The ‘Run command’ action is where the true power of integration lies. You can execute any executable or script on your system, passing the uploaded URL and other ShareX placeholders as arguments. This allows ShareX to become a trigger for virtually any other automation you can script.
8. Troubleshooting Your Custom Uploader: When Things Go Wrong
No matter how carefully you configure your ShareX custom uploader setup, sometimes things just don’t work as expected. The good news is ShareX provides excellent tools for troubleshooting. The first place to look is the ‘Upload history’ window. If an upload fails, you can right-click the entry and select ‘Show request/response’ to see exactly what ShareX sent to the server and what the server replied with. This is invaluable for diagnosing issues like incorrect API keys, malformed requests, or unexpected server responses.
Common pitfalls include incorrect ‘Request URL’ (a typo or wrong endpoint), wrong ‘Method’ (GET instead of POST), incorrect ‘File field name’, missing or malformed ‘Headers’ (especially for authentication), and incorrect JSONPath or regex for extracting the URL from the server’s response. Always consult the API documentation of the service you’re trying to integrate with. They’ll specify the exact ‘Request URL’, ‘Method’, required ‘Headers’, and the structure of their successful response, making your ShareX custom uploader setup much easier to debug. With a bit of patience and careful examination of the request/response data, you can usually pinpoint and resolve most issues fairly quickly.
Leveraging ShareX’s Debugging Tools and External Resources
Beyond the ‘Show request/response’ feature, here are some other tips for effective troubleshooting:
- Testing with External Tools: Before configuring ShareX, try sending the same request using a tool like Postman, Insomnia, or even
curlfrom your command line. If you can get a successful upload and a correct response from your service using these tools, then you know the issue is specific to your ShareX configuration, not the service itself. This isolates the problem significantly. - Browser Developer Tools: If your custom uploader involves interacting with a web form (even if ShareX automates it), you can often use your browser’s developer tools (F12) to inspect network requests. Upload a file manually through the website and observe the ‘Request URL’, ‘Method’, ‘Headers’, and ‘Form Data’ being sent. This provides a real-world example of how the server expects the request, which you can then replicate in ShareX.
- Server-Side Logs: If you control the server you’re uploading to, check its access and error logs. These logs can reveal if ShareX’s request even reached the server, if there were any server-side errors processing the file, or if authentication failed before ShareX even got a chance to parse a response.
- API Documentation: This can’t be stressed enough. The official API documentation for the service you’re using is your bible. It will precisely describe the required request format, authentication methods, and the expected structure of a successful response. Pay close attention to case sensitivity in field names and header keys.
- ShareX Forums/Community: If you’re stuck, the ShareX community (e.g., on GitHub, Reddit, or dedicated forums) can be a valuable resource. Someone might have already integrated with the same service you’re trying to use and can share their configuration or offer advice
Trending Now
Frequently Asked Questions
What is ShareX and how does it work?
ShareX is a free, open-source application for Windows that allows users to capture or record screen areas with a single hotkey and automatically upload the files to over 80 destinations. Its extensibility, particularly through custom uploaders, enables users to tailor the application to specific workflows and automate file uploads.
How do I set up a custom uploader in ShareX?
To set up a custom uploader in ShareX, launch the application and navigate to 'Destinations' in the sidebar, then select 'Custom uploaders'. From there, you can add, edit, or remove custom uploaders, configuring them to meet your specific needs for file uploads.
What are the benefits of using ShareX custom uploaders?
Using ShareX custom uploaders allows for greater flexibility in file management and sharing. It enables users to integrate with private servers or specific services, streamlining the process of uploading files and saving time by automating repetitive tasks.
Can ShareX upload files to cloud storage services?
Yes, ShareX can be configured to upload files to various cloud storage services by setting up custom uploaders. This feature allows users to automate the upload process to services that may not be included in the default options.
Is ShareX suitable for developers?
Absolutely! ShareX is highly beneficial for developers as it allows quick uploads of code snippets to specific pastebin services or internal tools. The custom uploader feature helps streamline their workflow and enhances productivity.
What did we miss? Let us know in the comments and join the conversation.


