Git Product home page Git Product logo

sharex-custom-upload's People

Contributors

davwheat avatar djkikisa avatar imgbotapp avatar jespertastesen avatar joegandy avatar lordbyronrs avatar mosrod avatar natfan avatar theaquarium avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sharex-custom-upload's Issues

Weird output

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?

Few things to add

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.

Can't see my gallery

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 logic for abstraction + unit tests

Break apart various parts of the upload process.

  • Getting config
  • Getting target dir (in new feature)
  • Uploading files

Once we isolate the logic we can wrap it in unit tests, this would speed up the PR process in the future

URL: You may not upload without the key parameter, see full config:

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.

Gallery

How do i get my gallery page working?

Large file uploads fail

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.

Error: "You may not upload with the key parameter"

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,
];

ShareX won't upload files

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)

500 Error

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)

Name

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?

Too few arguments to function get_file_target

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
#TimeMemoryFunctionLocation
10.0000400472{main}( )...\upload.php:0
20.0001400512get_file_target( )...\upload.php:16

Thanks a ton, sorry if it's just something simple I'm messing up. >.<

Gallery IP's

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..

Add a delete all option

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.

Adding IP to gallery

I've gone ahead and added my IPv6 and IPv4 to the gallery and neither are working. Am I missing something?

Gallery Not Working

Not sure if I've set something wrong but when I visit the gallery page all I'm getting is "Uploading Site" and "Free space: 117.51 GB / 138.34 GB" which isn't even right.
chrome_XFUFtyD6Ae

returns html

i added the max file size for php to 40m in /etc/php/apache2/

Gallery Not Working

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

Random file name

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.

Set it up perfectly, but the picture doesn't actually get uploaded and I don't get the right link

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?

Allowing for use with custom URL

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

You may not upload without the key parameter

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.

URL is empty

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?

IMG:
111

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.

Returning config.php on upload???

Message:
The remote server returned an error: (302) Redirect.

Request URL:
https://i.615283.net/upload.php/

Response:

<title>Document Moved</title>

Object Moved

This document may be found here/* This is a secure key that only you should know, an added layer of security for the image upload */ 'secure_key' => '[REDACTED]',

/* 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)

Gallery doesn't show

When i access my site via url.com/u is only shows the title. The table isn't there :/

Returing HTML?

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?

404 Error

I keep getting this error: (404) The Remote Server returned an error (404) Not found

Too many automatic redirections were attempted.

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.

Deleting file redirects to homepage?

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,`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.