JoeGandy / ShareX-Custom-Upload

A little PHP script created for uploading custom sharex files to your own webserver
MIT License
165 stars 50 forks source link

Handle indirect domain names #138

Open timhaettich opened 3 years ago

timhaettich commented 3 years ago

I want to host my images on my synology NAS to not waste webserver space. For this I've setup the following setup:

files.example.com -> CName pointing to: example.synology.me -> DDNS pointong to my IP: Port forward 80 to 80

I can open the webinterface through both the example.com and synology.me URL, but trying to use ShareX results in this error:

Error message: Unable to connect to the remote server

Request URL:
https://timothylh.synology.me/upload.php

Stack trace:
   at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
   at System.Net.HttpWebRequest.GetRequestStream()
   at ShareX.UploadersLib.Uploader.SendRequestFile(String url, Stream data, String fileName, String fileFormName, Dictionary`2 args, NameValueCollection headers, CookieCollection cookies, HttpMethod method, String contentType, String relatedData)

Both when pointing to example.com and synology.me

How would I need to set this up? Or could the code be changed to support this?

Thanks