Post: How to make your own custom ShareX Image Uploader (Custom domain etc)
02-06-2016, 05:17 PM #1
Octolus
I defeated!
(adsbygoogle = window.adsbygoogle || []).push({}); I've made this a while ago and customized it a little recently, thought it would be cool to share as I've seen people still using FTP to upload images through ShareX.
My code does not use any kind of database or anything, nor duplicate check.

This is a PHP API, that you upload to your server then add to your sharex custom uploader.

This does not use FTP to upload, it uses a PHP API. Which is a lot faster, however it's not really secure as it lets you upload any files. So, this is mainly made for personal usage - don't give your secret key out! Smile

NOTE: This tutorial is way more advanced than it needs to be, noob friendly.

What are the benefits of hosting your own images:
- You can delete them any time from your server.
- You store them on your own server, obviously.
- Most likely faster than Imgur.
- You can use CloudFlare to cache images, so it has same speed as Imgur once again.

Requirements:
- PHP Installed on the server (cPanel has this already / shared hosts)
- FTP/File Manager
- Text Editor / Sublime / Notepad

How to:
1.) Grab the upload.php code in bottom of the thread, then save it as upload.php
2.) Open it up in notepad, and change out the information.

In the top of the file after, you'll have some options. Such as how long the file name should be, what directory the images should be uploaded to and what the secret key should be. As well as domain url.

So, if you want to upload screenshots to:

You must login or register to view this content. you would have to have the following configuration:
You must login or register to view this content.

I don't think theres much to explain, but if you need help let me know.

3.) Upload the file as upload.php to your server so it can be accessed on You must login or register to view this content.
4.) Make a directory, in my case it's "i" without quotes then i chmod it to 777 so i can upload files to it. See GIF: You must login or register to view this content.

Once that's done, you've uploaded upload.php, edited it and made folder + chmod it.. you can go ahead to ShareX.

5.) In ShareX.. Go to destination settings then scroll till you see "Custom Uploader".

6.) Now in "Uploaders" you type in a name, like this for example then click add: You must login or register to view this content.
- Then you put your domain and link to the upload.php as request url: You must login or register to view this content.
- Then as File Form Name name you put "sharex".
- Then you add the secret key like this: You must login or register to view this content. then simply click "Add".

Once that done, it should look similar to this (other than different key & domain): You must login or register to view this content.

Now click test upload, and it should provide you with the URL to the image. If it does that, then it's done! Simply go to upload destinations and select custom image uploader: You must login or register to view this content.

Last edited by Octolus ; 02-06-2016 at 05:25 PM.

The following 10 users say thank you to Octolus for this useful post:

aaron25th, DaenerysTargy, Father Luckeyy, Frosty, Gekkougasz, i0ancy-, Joel, Kam, Kryptus, THΞSPIKYBROHD
08-07-2016, 11:44 AM #11
Joel
[move]Sal:madsal::laim:[/move]
I made a tutorial like this a while back. Probably much easier to use lol.
12-11-2016, 06:51 PM #12
Skowi
Gobble
Got this error :/
URL: File upload failed - CHMOD/Folder doesn't exist?
12-11-2016, 09:59 PM #13
Octolus
I defeated!
Originally posted by Skowi View Post
Got this error :/
URL: File upload failed - CHMOD/Folder doesn't exist?


make sure the folder exists and that it has chmod 777
01-12-2017, 05:06 PM #14
Originally posted by Octolus View Post
make sure the folder exists and that it has chmod 777


Hello, same error: (my file is in 777
01-15-2017, 06:36 PM #15
Trizmo
Gobble
im getting an error with mine
You must login or register to view this content.
Any ideas?

still uploads the file, just when it copies it copies that whole error with it to my clipboard
01-31-2017, 02:03 PM #16
Hey there,

upload etc. is working fine.

how can i display the image in my browser?

Thanks for reply in advance!
02-09-2017, 04:46 PM #17
Hydrogen
Super Mod
Oh shit nice release, I actually never seen this sadly.. :|
02-25-2017, 04:08 AM #18
Cryptic
Former Staff | Content Manager
I ended up sitting my ShareX to just upload to my imgur account whenever I use it. Much simpler than this method.
05-26-2017, 08:14 AM #19
What is the program you use to change the chmod to 777?

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo