Direct links file storage

Discuss other useful utilities, general computing tips & tricks, Internet resources, etc.
User avatar
DataLife
Posts: 248
Joined: 29 Sep 2013, 19:52

Direct links file storage

05 Aug 2018, 22:58

I have searched and can not find a suitable free (or inexpensive) online file hosting service that provides direct links.
I used to use Dropbox then they started blocking my links because of false positives.
So I started using Google Drive. Now they started the same thing.
I submit false positive reports but these antivirus companies are not responding to my false positive reports. Baidu, Cylance, Endgame, Jiangmin
So, getting a clean report from VirusTotal is impossible.

Requirements for online storage...
Free or less the $60 a year.
Direct links
no time limit for hosting (some delete for non activity and a specific amount of time)

thanks
DataLife
Check out my scripts. (MyIpChanger) (XPSnap) (SavePictureAs)
All my scripts are tested on Windows 10, AutoHotkey 32 bit Ansi unless otherwise stated.
burque505
Posts: 681
Joined: 22 Jan 2017, 19:37

Re: Direct links file storage

06 Aug 2018, 14:15

@DataLife, I've been pretty happy with SugarSync for some time. They give a 30 day free trial, so maybe it would be worth a try. I'm only paying $60 a year now, but I think I'm grandfathered in. It might be more now, I haven't checked.
Regards,
burque505
User avatar
DataLife
Posts: 248
Joined: 29 Sep 2013, 19:52

Re: Direct links file storage

07 Aug 2018, 07:43

burque505 wrote:@DataLife, I've been pretty happy with SugarSync for some time. They give a 30 day free trial, so maybe it would be worth a try. I'm only paying $60 a year now, but I think I'm grandfathered in. It might be more now, I haven't checked.
Regards,
burque505
I was able to get a direct link for OneDrive and so far all is good.

Sugar Sync is $7.49 a month.

thanks
DataLife
Check out my scripts. (MyIpChanger) (XPSnap) (SavePictureAs)
All my scripts are tested on Windows 10, AutoHotkey 32 bit Ansi unless otherwise stated.
User avatar
nnnik
Posts: 3527
Joined: 30 Sep 2013, 01:01
Location: Germany

Re: Direct links file storage

07 Aug 2018, 07:56

I think hosting your projects should be done on GitHub.
It's free and additionally gives you version control.
While direct link storages don't really care for single developers GitHub and similar services will try to defend against false positives - at least I would think that way.
Recommends AHK Studio
burque505
Posts: 681
Joined: 22 Jan 2017, 19:37

Re: Direct links file storage

07 Aug 2018, 08:37

@DataLife, glad you had good luck with OneDrive. I had really not even considered it, and have no good reason for not doing so, since it's free.
User avatar
DataLife
Posts: 248
Joined: 29 Sep 2013, 19:52

Re: Direct links file storage

08 Aug 2018, 18:51

nnnik wrote:I think hosting your projects should be done on GitHub.
It's free and additionally gives you version control.
While direct link storages don't really care for single developers GitHub and similar services will try to defend against false positives - at least I would think that way.
Does github allow non-freeware programs to be hosted?
I wrote a program that requires a paid registration.
At the moment it does not generate enough money to pay very much for online storage.

Datalife
Check out my scripts. (MyIpChanger) (XPSnap) (SavePictureAs)
All my scripts are tested on Windows 10, AutoHotkey 32 bit Ansi unless otherwise stated.
Guest

Re: Direct links file storage

11 Aug 2018, 03:18

Afaik it has to be opensource on GH, there is no reason you can't sell your own opensource program so that is an option.

Apart from cheap website hosting (dream host, blue host, weebly?) perhaps something like mediafire which allows direct links if you used the paid service - 3.75US$ a month at the moment.
User avatar
DataLife
Posts: 248
Joined: 29 Sep 2013, 19:52

Re: Direct links file storage

12 Aug 2018, 01:19

Guest wrote:Afaik it has to be opensource on GH, there is no reason you can't sell your own opensource program so that is an option.

Apart from cheap website hosting (dream host, blue host, weebly?) perhaps something like mediafire which allows direct links if you used the paid service - 3.75US$ a month at the moment.
Mediafire does appear to be exactly what I need for $3.75 a month. If I have any issues with OneDrive I probably will go with Mediafire.

thanks
Robert
Check out my scripts. (MyIpChanger) (XPSnap) (SavePictureAs)
All my scripts are tested on Windows 10, AutoHotkey 32 bit Ansi unless otherwise stated.
SOTE
Posts: 218
Joined: 15 Jun 2015, 06:21

Re: Direct links file storage

07 Sep 2018, 03:32

DataLife wrote:
Guest wrote:Afaik it has to be opensource on GH, there is no reason you can't sell your own opensource program so that is an option.

Apart from cheap website hosting (dream host, blue host, weebly?) perhaps something like mediafire which allows direct links if you used the paid service - 3.75US$ a month at the moment.
Mediafire does appear to be exactly what I need for $3.75 a month. If I have any issues with OneDrive I probably will go with Mediafire.

thanks
Robert
You might want to consider Yandex, if you are looking for free. https://disk.yandex.com/ Similar concept to Google Drive and they are a huge company so aren't going anywhere for a long while.

Also I'm surprised Google was doing you like that. I never had them block any of my links, but it does seem that once they target someone, it's like they put them on a blacklist.
User avatar
DataLife
Posts: 248
Joined: 29 Sep 2013, 19:52

Re: Direct links file storage

08 Sep 2018, 10:03

You might want to consider Yandex, if you are looking for free. https://disk.yandex.com/ Similar concept to Google Drive and they are a huge company so aren't going anywhere for a long while.

Also I'm surprised Google was doing you like that. I never had them block any of my links, but it does seem that once they target someone, it's like they put them on a blacklist.
I installed yandex disk. How do I get a direct link?
Check out my scripts. (MyIpChanger) (XPSnap) (SavePictureAs)
All my scripts are tested on Windows 10, AutoHotkey 32 bit Ansi unless otherwise stated.
burque505
Posts: 681
Joined: 22 Jan 2017, 19:37

Re: Direct links file storage

08 Sep 2018, 11:17

@DataLife, haven't tried it but here are the instructions.
User avatar
DataLife
Posts: 248
Joined: 29 Sep 2013, 19:52

Re: Direct links file storage

08 Sep 2018, 21:50

burque505 wrote:@DataLife, haven't tried it but here are the instructions.
What Yandex calls a direct link is not what I call a direct link. Yandex provides links that open a webpage and requires the user to click download.

My definition of a direct link downloads the file directly with no web page being loaded first.
Check out my scripts. (MyIpChanger) (XPSnap) (SavePictureAs)
All my scripts are tested on Windows 10, AutoHotkey 32 bit Ansi unless otherwise stated.
SOTE
Posts: 218
Joined: 15 Jun 2015, 06:21

Re: Direct links file storage

09 Sep 2018, 07:55

DataLife wrote:
burque505 wrote:@DataLife, haven't tried it but here are the instructions.
What Yandex calls a direct link is not what I call a direct link. Yandex provides links that open a webpage and requires the user to click download.

My definition of a direct link downloads the file directly with no web page being loaded first.
You don't have to install anything on your computer. From your Yandex account, you can create a download link to the file. You then can give others that link, similar to how Google Drive works.

Not sure about the web page, whether that's old documentation or something that just recently started. When using Yandex before, didn't get a web page, just the usual download for the file.
User avatar
DataLife
Posts: 248
Joined: 29 Sep 2013, 19:52

Re: Direct links file storage

11 Sep 2018, 15:44

Here is a link to a bear jpg image on my Yandex disk. When clicked on I am presented with a preview of the image and a "Save to Yandex.Disk" and "Download" page.

https://yadi.sk/i/FegdtHe8ixIQVg
Check out my scripts. (MyIpChanger) (XPSnap) (SavePictureAs)
All my scripts are tested on Windows 10, AutoHotkey 32 bit Ansi unless otherwise stated.
burque505
Posts: 681
Joined: 22 Jan 2017, 19:37

Re: Direct links file storage

11 Sep 2018, 17:59

@DataLife, I think you can still do it, jumping through a hoop or two. Check this page.
To get a URL for directly downloading a file, send the API the path on Yandex.Disk where the file to download should be accessible.
Regards,
burque505

Edit: I'm going to check out this GitHub link to see if it'll give links easily.
Edit: yadisk-direct works. Here's the URL for your bears.jpg file:
Spoiler
Let me know if it doesn't work for you. I just used Python 3.7 to install yadisk-direct.
Here's a little script to test it:
Spoiler
User avatar
DataLife
Posts: 248
Joined: 29 Sep 2013, 19:52

Re: Direct links file storage

11 Sep 2018, 21:02

@burque505
Yes the bears direct link works properly.
I read how yandex says to get the direct link but I do not understand.

"send the API"
"Get method"

Can you explain how you created the bears direct link?

thanks
DataLife
Check out my scripts. (MyIpChanger) (XPSnap) (SavePictureAs)
All my scripts are tested on Windows 10, AutoHotkey 32 bit Ansi unless otherwise stated.
User avatar
tomoe_uehara
Posts: 209
Joined: 05 Oct 2013, 12:37
Contact:

Re: Direct links file storage

12 Sep 2018, 02:53

If you need the capability of direct linking plus total control, you can just rent a cheap VPS (<- ref link) and setup a simple FTP (for example ftp://sub.domain.com/dir/file.txt)
Or if you just need a temporary solution, you can get some sort of free diskspace from https://www.000webhost.com/

Edit:
Or if you still want to use Yandex Disk, you can follow these steps:
  1. In your browser, login to your Yandex account, then go to https://oauth.yandex.com/
  2. Press the "Create new client" button
  3. Fill in the App Name & App Description
  4. Platform: Web Services
  5. Callback URI #1 = https://oauth.yandex.com/verification_code
  6. Permission -> Yandex.Disk REST API -> Turn on all 4 options
  7. Save & Generate App
  8. You will see the detailed information of your newly created App, copy the "ID"
  9. In your browser, go to https://oauth.yandex.com/authorize?resp ... he-ID-here>
  10. It will generate your Authorization Token, put the token into the script below

Code: Select all

token := "<fill-your-authorization-token-here>"

;===============================================
filename := "Bears.jpg"
ToolTip, Downloading %filename% ...
headers := { "Authorization": "OAuth " . token }
url := "https://cloud-api.yandex.net/v1/disk/resources/download?path=%2F" . filename
json := Jxon_Load(http("get", url, headers))
UrlDownloadToFile, % json.href, %A_ScriptDir%/%filename%
;-----------------------
filename := "Moscow.jpg"
ToolTip, Downloading %filename% ...
headers := { "Authorization": "OAuth " . token }
url := "https://cloud-api.yandex.net/v1/disk/resources/download?path=%2F" . filename
json := Jxon_Load(http("get", url, headers))
UrlDownloadToFile, % json.href, %A_ScriptDir%/%filename%
;-----------------------
filename := "Sea.jpg"
ToolTip, Downloading %filename% ...
headers := { "Authorization": "OAuth " . token }
url := "https://cloud-api.yandex.net/v1/disk/resources/download?path=%2F" . filename
json := Jxon_Load(http("get", url, headers))
UrlDownloadToFile, % json.href, %A_ScriptDir%/%filename%
;===============================================
ToolTip
Msgbox Done!
ExitApp


; ---------------- Functions ----------------
http(method, url, oHeaders := "") {
	static whr := ComObjCreate("WinHttp.WinHttpRequest.5.1")
	whr.Open(method, url, true)

	for k, v in oHeaders {
		whr.SetRequestHeader(k, v)
	}
	if (method ~= "i)POST|PUT") && !oHeaders["Content-Type"] {
		whr.SetRequestHeader("Content-Type", "application/x-www-form-urlencoded")
	}

	whr.Send()
	whr.WaitForResponse()
	return whr.ResponseText
}


; https://autohotkey.com/boards/viewtopic.php?t=627
Jxon_Load(ByRef src, args*) {
	static q := Chr(34)

	key := "", is_key := false
	stack := [ tree := [] ]
	is_arr := { (tree): 1 }
	next := q . "{[01234567890-tfn"
	pos := 0
	while ( (ch := SubStr(src, ++pos, 1)) != "" )
	{
		if InStr(" `t`n`r", ch)
			continue
		if !InStr(next, ch, true)
		{
			ln := ObjLength(StrSplit(SubStr(src, 1, pos), "`n"))
			col := pos - InStr(src, "`n",, -(StrLen(src)-pos+1))

			msg := Format("{}: line {} col {} (char {})"
			,   (next == "")      ? ["Extra data", ch := SubStr(src, pos)][1]
			  : (next == "'")     ? "Unterminated string starting at"
			  : (next == "\")     ? "Invalid \escape"
			  : (next == ":")     ? "Expecting ':' delimiter"
			  : (next == q)       ? "Expecting object key enclosed in double quotes"
			  : (next == q . "}") ? "Expecting object key enclosed in double quotes or object closing '}'"
			  : (next == ",}")    ? "Expecting ',' delimiter or object closing '}'"
			  : (next == ",]")    ? "Expecting ',' delimiter or array closing ']'"
			  : [ "Expecting JSON value(string, number, [true, false, null], object or array)"
			    , ch := SubStr(src, pos, (SubStr(src, pos)~="[\]\},\s]|$")-1) ][1]
			, ln, col, pos)

			throw Exception(msg, -1, ch)
		}

		is_array := is_arr[obj := stack[1]]

		if i := InStr("{[", ch)
		{
			val := (proto := args[i]) ? new proto : {}
			is_array? ObjPush(obj, val) : obj[key] := val
			ObjInsertAt(stack, 1, val)
			
			is_arr[val] := !(is_key := ch == "{")
			next := q . (is_key ? "}" : "{[]0123456789-tfn")
		}

		else if InStr("}]", ch)
		{
			ObjRemoveAt(stack, 1)
			next := stack[1]==tree ? "" : is_arr[stack[1]] ? ",]" : ",}"
		}

		else if InStr(",:", ch)
		{
			is_key := (!is_array && ch == ",")
			next := is_key ? q : q . "{[0123456789-tfn"
		}

		else ; string | number | true | false | null
		{
			if (ch == q) ; string
			{
				i := pos
				while i := InStr(src, q,, i+1)
				{
					val := StrReplace(SubStr(src, pos+1, i-pos-1), "\\", "\u005C")
					static end := A_AhkVersion<"2" ? 0 : -1
					if (SubStr(val, end) != "\")
						break
				}
				if !i ? (pos--, next := "'") : 0
					continue

				pos := i ; update pos

				  val := StrReplace(val,    "\/",  "/")
				, val := StrReplace(val, "\" . q,    q)
				, val := StrReplace(val,    "\b", "`b")
				, val := StrReplace(val,    "\f", "`f")
				, val := StrReplace(val,    "\n", "`n")
				, val := StrReplace(val,    "\r", "`r")
				, val := StrReplace(val,    "\t", "`t")

				i := 0
				while i := InStr(val, "\",, i+1)
				{
					if (SubStr(val, i+1, 1) != "u") ? (pos -= StrLen(SubStr(val, i)), next := "\") : 0
						continue 2

					; \uXXXX - JSON unicode escape sequence
					xxxx := Abs("0x" . SubStr(val, i+2, 4))
					if (A_IsUnicode || xxxx < 0x100)
						val := SubStr(val, 1, i-1) . Chr(xxxx) . SubStr(val, i+6)
				}

				if is_key
				{
					key := val, next := ":"
					continue
				}
			}

			else ; number | true | false | null
			{
				val := SubStr(src, pos, i := RegExMatch(src, "[\]\},\s]|$",, pos)-pos)
			
			; For numerical values, numerify integers and keep floats as is.
			; I'm not yet sure if I should numerify floats in v2.0-a ...
				static number := "number", integer := "integer"
				if val is %number%
				{
					if val is %integer%
						val += 0
				}
			; in v1.1, true,false,A_PtrSize,A_IsUnicode,A_Index,A_EventInfo,
			; SOMETIMES return strings due to certain optimizations. Since it
			; is just 'SOMETIMES', numerify to be consistent w/ v2.0-a
				else if (val == "true" || val == "false")
					val := %value% + 0
			; AHK_H has built-in null, can't do 'val := %value%' where value == "null"
			; as it would raise an exception in AHK_H(overriding built-in var)
				else if (val == "null")
					val := ""
			; any other values are invalid, continue to trigger error
				else if (pos--, next := "#")
					continue
				
				pos += i-1
			}
			
			is_array? ObjPush(obj, val) : obj[key] := val
			next := obj==tree ? "" : is_array ? ",]" : ",}"
		}
	}

	return tree[1]
}
Good luck!
burque505
Posts: 681
Joined: 22 Jan 2017, 19:37

Re: Direct links file storage

12 Sep 2018, 08:01

@DataLife, I downloaded and installed the Python program "yadisk-direct" from this GitHub link, which is also in the post above. I used it to create the link.
The instructions are on that website. It is extremely easy to do (somewhat easier, perhaps, at least if you're just creating a URL for downloads, than using @tomoe_uhara's very nice script above).
In my case, I just ran the following from the command line to get the link for your jpg:

Code: Select all

C:\> yadisk-direct https://yadi.sk/i/FegdtHe8ixIQVg > bears.txt
Open bears.txt, and the URL is inside.
If you have curl installed, according to the website you could do the following creating and downloading the link with one line:

Code: Select all

curl -L $(yadisk-direct https://yadi.sk/i/FegdtHe8ixIQVg) -o Bears.jpg
(I haven't tried it yet, but I will. I don't see any reason it shouldn't work). Edit: Haven't gotten the curl command to work yet.
Regards,
burque505
burque505
Posts: 681
Joined: 22 Jan 2017, 19:37

Re: Direct links file storage

12 Sep 2018, 18:51

@DataLife, I hope this will help. I've zipped up a yadisk-direct.exe that you could put in the same directory as the script below.

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

#Persistent
InputBox, diskurl, Yandex File, Yandex file (short) URL
InputBox, filename, Local Filename, Input the local file name you want
;https://yadi.sk/i/FegdtHe8ixIQVg
RunWait %ComSpec% /c yadisk-direct.exe %diskurl% > url.txt
FileRead, theURL, url.txt
URLDownloadToFile, %theURL%, %filename%


ExitApp
yadisk-direct.zip
(47.99 KiB) Downloaded 16 times
(This is a python "executable", which usually means it's just been packed by py2exe. Please let me know if it doesn't work)
User avatar
DataLife
Posts: 248
Joined: 29 Sep 2013, 19:52

Re: Direct links file storage

12 Sep 2018, 19:14

burque505 wrote:@DataLife, I hope this will help. I've zipped up a yadisk-direct.exe that you could put in the same directory as the script below.

Code: Select all

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

#Persistent
InputBox, diskurl, Yandex File, Yandex file (short) URL
InputBox, filename, Local Filename, Input the local file name you want
;https://yadi.sk/i/FegdtHe8ixIQVg
RunWait %ComSpec% /c yadisk-direct.exe %diskurl% > url.txt
FileRead, theURL, url.txt
URLDownloadToFile, %theURL%, %filename%


ExitApp
yadisk-direct.zip
(This is a python "executable", which usually means it's just been packed by py2exe. Please let me know if it doesn't work)
I downloaded the zip file, unzipped it and ran your script. The command window flashed and nothing else happened. So I went to the command prompt and typed it in manually so I could see the error.

I typed yadisk-direct.exe https://yadi.sk/i/FegdtHe8ixIQVg > url.txt

Fatal error in launcher: Unable to create process using '"c:\users\winter\appdata\local\programs\python\python37\python.exe" "C:\Users\Robert\MEGA\Autohotkey\MyScripts\yadisk-direct.exe" https://yadi.sk/i/FegdtHe8ixIQVg '

Am I missing something? Maybe python.exe? It looks like the path is hard coded for a user named "winter"
Check out my scripts. (MyIpChanger) (XPSnap) (SavePictureAs)
All my scripts are tested on Windows 10, AutoHotkey 32 bit Ansi unless otherwise stated.

Return to “Other Utilities & Resources”

Who is online

Users browsing this forum: No registered users and 6 guests