joegandy / sharex-custom-upload Goto Github PK
View Code? Open in Web Editor NEWA little PHP script created for uploading custom sharex files to your own webserver
License: MIT License
A little PHP script created for uploading custom sharex files to your own webserver
License: MIT License
I can upload jpg, png, and smaller mp4 files just fine but when i tried to upload a 25mb mp4 file i keep getting an error that i cant upload without the key parameter.
Could this be caused by php settings?
Hi, sorry to make a new topic when there's one already for this issue but that one doesnt have a solution and has been closed.
My webpage returns a 500 error when I try to upload using these settings:
https://i.imgur.com/8n63hCV.png
https://i.imgur.com/3SfZgAf.png
Error log: https://i.imgur.com/0EfccPX.png
All help appreciated
Adam
I get this output:
`
URL: <script type="text/javascript" src="/aes.js" ></script><script>function toNumbers(d){var e=[];d.replace(/(..)/g,function(d){e.push(parseInt(d,16))});return e}function toHex(){for(var d=[],d=1==arguments.length&&arguments[0].constructor==Array?arguments[0]:arguments,e="",f=0;f<d.length;f++)e+=(16>d[f]?"0":"")+d[f].toString(16);return e.toLowerCase()}var a=toNumbers("f655ba9d09a112d4968c63579db590b4"),b=toNumbers("98344c2eee86c3994890592585b49f80"),c=toNumbers("7949e2c5384cefd2781566deca08606c");document.cookie="__test="+toHex(slowAES.decrypt(c,2,a,b))+"; expires=Thu, 31-Dec-37 23:55:55 GMT; path=/"; location.href="http://images-da-bald-eagul.ga/ShareX-Custom-Upload-master/src/upload.php?i=1";</script>This site requires Javascript to work, please enable Javascript in your browser or use a browser with Javascript support
`
is there anything I need to change in ShareX?
every time I refresh the HTTPS goes away, but on page load it shows, only shows if I manually type in https
TL;DR: Calendar Search, Program Search, Zero Width links.
First of all I think the Search isn't really useful for finding something you uploaded maybe have it be a calendar that shows what you uploaded that day or have it be from one date to another. Secondly have a way to search what program was used which can be done by what is received from ShareX and taking that first part of the name (example chrome_Esf8S93qPS.png would be Chrome). Lastly something like this but for the image link. Maybe True/False or 1 2 3 for the different types of naming schemes.
As title says, I can't see my gallery, only thing that shows up is
"Uploading Site
Free space: 104.18 GB / 733.18 GB"
Any idea to make it show up? Or am I just stupid?
'allowed_ips' => array('192.168.0.0', '0.0.0.0'),
^ standard settings for IPs, hosted online, accessing from my own PC
Break apart various parts of the upload process.
Once we isolate the logic we can wrap it in unit tests, this would speed up the PR process in the future
I'm sure I've done everything correctly. Because I had a way older version I downloaded this updates version but now I get this error?
Using HTTPS and changed every /u/ to / because I use the root directory, pretty sure I've set it up correctly but I just keep getting this error, no matter what I do.
Hopefully someone can help.
Got the following two errors:
<b>Strict Standards</b>: Only variables should be passed by reference in <b>upload.php</b> on line <b>12</b><br />
<br />
<b>Strict Standards</b>: Only variables should be passed by reference in <b>upload.php</b> on line <b>14</b><br />
Seems end is passed by reference and should be a variable, see http://stackoverflow.com/questions/4636166/only-variables-should-be-passed-by-reference
Great work btw, love it.
How do i get my gallery page working?
When uploading a large file (about 2MB or larger) it puts an error in your clipboard.
Sorry, there was a problem uploading your file. (Ensure your directory has 777 permissions)
On some files, it will just copy the index.html contents to your clipboard.
I'm not super pro, so it could be an error with my server, but I've increased the max upload sizes, exec time, etc.
I just set everything up but somehow my secret key won't get accepted. I tried test
as secure_key but when I test the shareX config, I get the You may not upload with the key parameter
error.
My config file:
return [
/* This is a secure key that only you should know, an added layer of security for the image upload */
'secure_key' => 'test',
/* This is the url your output will be, usually http://www.domain.com/u/, also going to this url will be the gallery page */
'output_url' => 'https://sharex.domain.me/u/',
/* This request url, so the path pointing to the uplaod.php file */
'request_url' => 'https://sharex.domain.me/upload.php',
/* This is a redirect url if the script is accessed directly */
'redirect_url' => 'https://domain.me/',
/* This is a list of IPs that can access the gallery page (Leave empty for universal access) */
'allowed_ips' => [],
/* Page title of the gallery page */
'page_title' => 'ShareX Gallery',
/* Heading text at the top of the gallery page */
'heading_text' => 'Uploading Site',
/* Delete file option (true to enable, disabled by default) */
'enable_delete' => false,
/* Show image in tooltip (true to enable, disabled by default) */
'enable_tooltip' => false,
/* Show link to download all files as .zip (Untested with large archives of files) */
'enable_zip_dump' => false,
/* Generate random name (true to enable, disabled by default) */
'enable_random_name' => true,
/* Select lenght of random name (10 symbols by default) */
'random_name_length' => 10,
];
Instead of /u/image.png, I'd rather have /image.png. Is this possible?
Error: Message:
Too many automatic redirections were attempted.
Request URL:
https://redacted/upload.php
Stack trace: at System.Net.HttpWebRequest.GetResponse() at ShareX.UploadersLib.Uploader.SendRequestFile(String url, Stream data, String fileName, String fileFormName, Dictionary2 args, NameValueCollection headers, CookieCollection cookies, ResponseType responseType, HttpMethod method, String contentType, String metadata)
Keep getting this error. Followed the instructions.
Stack trace:
at System.Net.HttpWebRequest.GetResponse()
at ShareX.UploadersLib.Uploader.SendRequestFile(String url, Stream data, String fileName, String fileFormName, Dictionary`2 args, NameValueCollection headers, CookieCollection cookies, ResponseType responseType, HttpMethod method, String contentType, String metadata)
Currently i use "%rn%ra%rn%ra%rn%ra%rn%ra%rn%ra%rn%ra" for a random name, before it used to show all alternatives you could do when hovering over the column, but it no longer does this.. so can anyone with knowledge on this write all name random syntaxes or whatever it's called here?
When your IP is not whitelisted it will still show the user who doesn't have access the free space of the website.
http://83575.aoweb.nl/u/B6aW9gc4DO.png
Hey, I've been trying to set up this file uploader for a little while now, however no matter what I do it never works. I've followed the instructions to a T yet it still doesn't work. I will admit that I don't really have much, or any for that experience with any of this so I very well may be doing something. A little bit of help would be wonderfully helpful.
Here's the info I've got.
( ! ) Fatal error: Uncaught ArgumentCountError: Too few arguments to function get_file_target(), 2 passed in D:\wamp64\www\upload.php on line 16 and exactly 3 expected in D:\wamp64\www\u\functions.php on line 27 | ||||
---|---|---|---|---|
( ! ) ArgumentCountError: Too few arguments to function get_file_target(), 2 passed in D:\wamp64\www\upload.php on line 16 and exactly 3 expected in D:\wamp64\www\u\functions.php on line 27 | ||||
Call Stack | ||||
# | Time | Memory | Function | Location |
1 | 0.0000 | 400472 | {main}( ) | ...\upload.php:0 |
2 | 0.0001 | 400512 | get_file_target( ) | ...\upload.php:16 |
Thanks a ton, sorry if it's just something simple I'm messing up. >.<
The only way I can access my gallery is by making it totally open..
I've added every IP it could possibly be: myexternalip, my ipv4ip, 127.0.0.1. Everything, and yet I can only view it if its got no IP's in the field. I really want the gallery to be private..
Would it be possible to have a purge/delete all images option? I like having my own ShareX Custom Uploader but disk space will be a problem long term and i'd rather not manually delete them all or FTP into the server to manually delete them.
I've gone ahead and added my IPv6 and IPv4 to the gallery and neither are working. Am I missing something?
i added the max file size for php to 40m in /etc/php/apache2/
Got your script working and is great! However your gallery doesn't seem to be working.
I can access the 'index.php' page and has no table with no images in there.
https://i.imgur.com/QtBiJ5G.png
That is a screenshot of what I see. There are files and screenshots in the folder however it isn't displaying them
It would be cool if there was a config option to generate a random name on the php end instead of providing the name from your sharex client. It looks like there's no checking if the file already exists on the server so you can't use sharex to randomize characters because you'll eventually have conflicts. A lot of other uploaders already have this, but this one seems to be the best besides that issue.
Hi,I have a little problem with this shareX script. Every Time I want to upload screenshot I got this communicate.
"You may not upload without the key parameter, see full config: https://github.com/JoeGandy/ShareX-Custom-Upload/blob/master/README.md#automatic-setup"
Hi! Let me just start by saying I love this stuff, and I find it really useful since I'm trying to get my own image uploader without Imgur taking ages to upload and then compressing stuff. So... Thank you so much!
There's only two issues, though; I set everything perfectly, and when I capture a region and send it through the custom destination thingy, I get the HTML code of my index page as the URL!
Sounds weird, isn't it? But the weird part is, it tells me the file was uploaded but I can't see it on my server.
What did I do wrong? Is there something I need to set in the PHP settings themselves?
Hey again
I use domain.abc
to upload atm but I have gotten another url that's shorter (domain.xyz
) and better but cannot be used as the primary url. I tried following ShareX Custom Uploader Official Guide to get my domain.abc/image
output as domain.xyz/image
using several of the mentioned stuff.
The method I want to work right now is using domain.xyz/$response$
in URL field , but $response$
outputs the entire domain.abc/image
URL, so if I try domain.xyz/$response$
I get domain.xyz/domain.abc/image
I am tired so might be bad at explaining but sincerely hope you understand me.
Sincerely, Simon
I have downloaded the automatic import script and everything but i still get this error when i attempt to test the settings. I checked the settings manually and they all seem correct from both ends but still getting the error.
Where dose it save the images? Because it sends me link it calls it 'Test.png' then it sends me the link, however dose not work.
all set up correctly, but:
uploading result responds with http://pastebin.com/B6it0JU6
With the deletion option enabled, how would I put a deletion URL in Sharex?
Im having issues making this work, i had a working one of these before... but now i have reset my computer.. and now i can't seem to get it to work... i've done the exact same thing 1:1 i did before..
But now it just throws me the error URL is empty...? did sharex add something new you gotta add?
Also, i wanna add i cannot get gallery to work... i've allowed all ips (no luck) and i've allowed my ip (no luck) anyway.
Message:
The remote server returned an error: (302) Redirect.
Request URL:
https://i.615283.net/upload.php/
Response:
<title>Document Moved</title>/* This is the url your output will be, usually http://www.domain.com/u/, also going to this url will be the gallery page */
'output_url' => 'https://i.615283.net/u/',
/* This is a redirect url if the script is accessed directly */
'redirect_url' => 'https://www.615283.net/',
/* This is a list of IPs that can access the gallery page (Leave empty for universal access) */
'allowed_ips' => ['192.168.0.0', '127.0.0.1'],
/* Page title of the gallery page */
'page_title' => 'Files',
/* Heading text at the top of the gallery page */
'heading_text' => 'Files',
/* Delete file option (true to enable, disabled by default) */
'enable_delete' => false,
/* Show image in tooltip (true to enable, disabled by default) */
'enable_tooltip' = true
Stack trace:
at System.Net.HttpWebRequest.GetResponse()
at ShareX.UploadersLib.Uploader.SendRequestFile(String url, Stream data, String fileName, String fileFormName, Dictionary`2 args, NameValueCollection headers, CookieCollection cookies, ResponseType responseType, HttpMethod method, String contentType, String metadata)
Where do i find /u/config.php
Idk where
When i access my site via url.com/u is only shows the title. The table isn't there :/
how to use that ? :c
Sometimes when recording videos, not a URL is returned, but the HTML of my webpage that the php is set to redirect normal requests to. Any idea why?
ive tried it a few times and its not changing the link http://i.imgur.com/uZHhYgm.png the only way to change it is going into the custom uploading settings and changing the arguments
Any help appreciated
I keep getting this error: (404) The Remote Server returned an error (404) Not found
Hey all,
I'm trying to get this set up on my webserver. I copied the /src/ folder to /i/ (for images) and moved the uploader to my root http directory (/srv/http/) but I'm gettong the following error:
Error: Message:
Too many automatic redirections were attempted.
Request URL:
http://natfan.io/upload.php
Stack trace:
at System.Net.HttpWebRequest.GetResponse()
at ShareX.UploadersLib.Uploader.SendRequestFile(String url, Stream data, String fileName, String fileFormName, Dictionary`2 args, NameValueCollection headers, CookieCollection cookies, ResponseType responseType, HttpMethod method, String contentType, String metadata)
I've tried both http and https, along with natfan.io and www.natfan.io, but to no avail. The following is my config file, with the secure key redacted:
<?php
return array(
/* This is a secure key that only you should know, an added layer of security for the ima
ge upload */
'secure_key' => 'SECUREKEYISSUPERSECURE!',
/* This is the url your output will be, usually http://www.domain.com/u/, also going to this
url will be the gallery page */
'output_url' => 'http://natfan.io/i/',
/* This is a redirect url if the script is accessed directly */
'redirect_url' => 'http://natfan.io/',
/* This is a list of IPs that can access the gallery page (Leave empty for universal access)
*/
'allowed_ips' => array('192.168.0.0', '0.0.0.0'),
/* Page title of the gallery page */
'page_title' => 'Natfan\'s Image Uploader',
/* Heading text at the top of the gallery page */
'heading_text' => 'Natfan\'s Image Uploader',
);
The following is a screenshot of my ShareX settings; again with the secure key redacted.
Am I doing anything wrong or just being silly? I'm running Arch Linux with apache2.
When I delete files in the gallery it automatically redirects me to my domain homepage vs staying on the gallery page. How can I stop this redirection?
Below is an example of what my configuration file looks like:
` /* This is a secure key that only you should know, an added layer of security for the image upload */
'secure_key' => 'MYKEYHERE',
/* This is the url your output will be, usually http://www.domain.com/u/, also going to this url will be the gallery page */
'output_url' => 'https://mydomain.com/u/',
/* This request url, so the path pointing to the uplaod.php file */
'request_url' => 'https://mydomain.com/upload.php',
/* This is a redirect url if the script is accessed directly */
'redirect_url' => 'https://mydomain.com/u/',
/* This is a list of IPs that can access the gallery page (Leave empty for universal access) */
'allowed_ips' => ['127.0.0.1', '::1', '0.0.0.0'],
/* Page title of the gallery page */
'page_title' => 'My Upload Site',
/* Heading text at the top of the gallery page */
'heading_text' => 'My Site',
/* Delete file option (true to enable, disabled by default) */
'enable_delete' => true,
/* Show image in tooltip (true to enable, disabled by default) */
'enable_tooltip' => true,
/* Show link to download all files as .zip (Untested with large archives of files) */
'enable_zip_dump' => false,
/* Generate random name (true to enable, disabled by default) */
'enable_random_name' => true,
/* Select lenght of random name (10 symbols by default) */
'random_name_length' => 10,`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.