Hosting a File in a URL

Termer

Fullstack developer
OP
Member
Joined
Apr 26, 2017
Messages
242
Trophies
0
Location
The nearest computer
Website
termer.net
XP
335
Country
United States
Sometimes it's a pain hosting files. Then I discovered this!
To host a file in a URL, you have to start the URL like this:
Code:
data:binary/bin;base64,
Use a website like this to convert your file to base64
Copy the text in you get (it will probably look like nonsense)
Paste it after
Code:
data:binary/bin;base64,
,
And you've got your file URL!
If it's a special type of file, you can change "bin" to the file extension.
Example:
My Logo. Rename to logo.png once downloaded.
Code:
data:binary/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAgCAYAAACcuBHKAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4QoKExYBQT4CKgAAAB1pVFh0Q29tbWVudAAAAAAAQ3JlYXRlZCB3aXRoIEdJTVBkLmUHAAADnklEQVRYw6VXz0tUURT+zn2voVAxRwatIAcMWgxYbkJzlwYZhLQSIqJF/0FtWrVt27JN/0CbCKGVmxRqEbbRRQtBJNKxBnOE0sZ3T4vnve+8++5786wDw9y5P8459zvfOecOMTNDiMYSDjEPIDVdTqI6Qv0BdOo5OngRzzEAEuoomescXsQZtYTQGtcaSikwDgFsxecZIIq/gXhsxM4hUd7aPcDiwls8eHiAP7wdL9KxXRL2CWCu4NXLe5i4tgJlHCCi2Ki14nGAEwfIzFE8He8j7LXb+Lq1GZ9hgQAjpf/b5jyqZ6+i0WjETiilrCGrUMAGOQfXsHBIjEnsNd9G//7eebx5PYHp6Rvo6+tLwkHHp6RC4wgJR6wxGRoPPexecSETirXPT9Fo1DE8PAxmjpFAjhJXpGFpXIYqb6+Rj8u30PpxAbOztxEEAYgo7QRzArPVS0I/pwkuDec5KNH8/auO9S93MD4+ltob2qxgBhGBuAc7zSqUoowxBmFwcBcqjCzj+ZiALBjNXMP37SoUkcgKwuK7u6iPXMbo6Cik3VApZSdixyexvrqA1bW1DJSdzmncf/QY/f07VnkaGoDRgdJPsPLpJjY2NlLnR0ZqmJq6jnQyUBYJZo3pmUmMXbmEo6Mjhye96O19BtBOTDRhnIRHQRBhbm4GzWYTWmt7vlqtolKpODo5yQ4bDiJorVGr1bzEOoCChqghEhFHhoaGUrrN2BVlU5PIbjBQ5QkJMhJOVuFdZ4gIyvyQ3koIi1LYkJYdB6MoykDuG9twmFtLolBekvvqgIMGAwiCIGVEIiuRt0iYWxsPy6BgjDEnnzxiGI65SEi7yo1/GRRsgyuojN10ppBw4+RjsR07XZRFNfWVeXPbbhdTpo1niZfARrJFmvSUXKByiPj023Ak74nkOi5h89IU+XSwZ31IS7vKVEwzobUul6KyS3O5W+dJ6BarsikqYaAu9UrqS9pDkrpKVi5ZtruhQPL5xvkhKcUJH2RlyjaL9s34v3AoCRkzly5WEO+Ik6LgXjR0S2pZPthtJRzxlW352z75fSiYTDHrsljJ0PgypFuWybWwiANFNUI+cn2toxuv5Lr6p75BaQSoqGKV4Ydhr/nkpZEvHIz0f5KTZIVcC4sQcHu/S0qC4wxx6Y4s10JZtt2Xtxwba1F0Du12y6t4/2c/iNhLQtlHXOdSLyv3FZQhFwE94XssLi+g1Wp5a+nAQJgJQ1GKAsBfKzcMrfNPA7EAAAAASUVORK5CYII=
 

rctgamer3

Well-Known Member
Member
Joined
May 5, 2008
Messages
321
Trophies
1
XP
576
Country
Netherlands
You could've set the MIME type of your icon to image/png instead of binary/png, this way all browsers render them just fine.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • Sicklyboy @ Sicklyboy:
    Thanks ken
  • BigOnYa @ BigOnYa:
    Great game. But I'd buy it straight up before paying for prime. Unless you order something everyday from amazon, not worth it imo
  • Sicklyboy @ Sicklyboy:
    I'm one of those people that Amazon loses money on the Prime subscription with
  • Sicklyboy @ Sicklyboy:
    I abuse the fuck out of it
  • K3Nv2 @ K3Nv2:
    Prime says I've already saved $400 this year lol
  • Sicklyboy @ Sicklyboy:
    Where do you see how much you've saved?
  • K3Nv2 @ K3Nv2:
    Under orders
  • BigOnYa @ BigOnYa:
    See maybe good for you guys, but I don't hardly ever order from amazon, maybe only couple times a month
  • K3Nv2 @ K3Nv2:
    Primes great because I stopped getting into arguments with the door greeter at Walmart
  • Sicklyboy @ Sicklyboy:
    hahahahaha
  • K3Nv2 @ K3Nv2:
    They see me so much in there they don't even ask for me receipt anymore tbh
  • Sicklyboy @ Sicklyboy:
    Pain in the ass, don't see it anywhere on the desktop site, had to pull it up on my phone
  • K3Nv2 @ K3Nv2:
    Think they gave up on the website and mainly focus on the app
  • Sicklyboy @ Sicklyboy:
    Desktop site > mobile site > mobile app
  • Sicklyboy @ Sicklyboy:
    Mobile app is such absolute dogshit, I haven't used it in SO long
  • K3Nv2 @ K3Nv2:
    Yeah mobile versions better people don't think about how apps are just shrunken down websites
  • K3Nv2 @ K3Nv2:
    Could be the phone connection etc I've mostly been fine with the app
  • K3Nv2 @ K3Nv2:
    Regardless fuck bezos
    +1
  • Sicklyboy @ Sicklyboy:
    Agreed. Crazy how both seeking a job at Amazon, and subsequently quitting Amazon, are both some of the best decisions I've ever made
  • K3Nv2 @ K3Nv2:
    Did someone loose a leg? You're fired
  • K3Nv2 @ K3Nv2:
    Ffs 55gb patch for hogwarts legacy
  • SylverReZ @ SylverReZ:
    @K3Nv2, Teslas are prob running Windows XP to this day.
    SylverReZ @ SylverReZ: @K3Nv2, Teslas are prob running Windows XP to this day.