The blog has moved to Medium: https://medium.com/pixeldrain
I’ve been procrastinating this update for so long that I may not remember everything I added :). What eventually pushed me over the edge was that the Vultr server ran out of bandwidth and I had to take the website offline. And because it was offline already I didn’t have any excuse left to upgrade the software to the newest version.
So first I got in contact with someone who offered to host pixeldrain a few months ago. He’s a real nice guy and is very excited about keeping the website running at all times. The server is now based in America, along the west coast I believe. This means that it will be slightly less responsive for us Europeans. The Russians might be the ones suffering the most from this, and they make up the biggest part of my user base :P. I’ve been testing for a while now, and the speed decrease is not that bad at all.
So here goes the changelog:
- Accounts system, you can now access your uploaded files from anywhere around the planet as long as you can memorize your password 😉
- Cloudflare and SSL, yay for security and speed! Cloudflare has an upload size limitation of 100 MB though, I’m looking for ways to work around that, it will be solved very soon, I promise.
- New design. It’s slightly brighter, and looks better during daytime 😛
- New background patterns (Have you noticed? 😉
- Speed improvements. I spent a lot of time optimizing the database and controller methods, I’m pretty sure it can handle any load now.
- New API features. Though they are undocumented, working on that..
- The file viewer page should be more mobile friendly now. Double tap an image to enlarge it. I haven’t gotten it to work on firefox for android yet, it is somehow ignoring my doubletap events.
- Keyboard shortcuts. When viewing a file click “Details” to view them. There is also one undocumented one, press CTRL + S on https://pixeldra.in/t to upload your text file.
- List downloading. When viewing a list of files you can click the “Download all files” button in the toolbar to, well, download all the files. Or press SHIFT + S, which does the same. It gets streamed to your browser as a zip file, and that while the server is still packaging it. It’s really quick!
- Thumbnails! I finally got it to work reliably, there are tons of annoying bugs in Java which make the default image processing library practically useless, so I resorted to my best buddy ImageMagick. It’s fast as hell! All image files of under 10 MB in size will be converted to a 100*100 px PNG.
- I re-factored a lot of stuff. But you as the user will probably not notice any of that..
- A shiny new account page with a bandwidth counter to keep track of how much more you can upload.
- Probably more too, but I can’t remember everything
Have fun and spread the word 🙂
I keep seeing NullPointer errors in the server logs, and I found out the reason. When someone creates a list of files, it gets an URL starting with /l/. In the background this ID refers to an array of file IDs, but when one of those files expires the server won’t be able to deliver the list and breaks. When it does that it shows a “Whitelabel error page” to the user, that’s simply because I didn’t have time to add a real error page (fixed in the next version) :).
Now the question is: How did those files expire while they were still being used? Well, because of a little error I made: When a user views a file list page, it doesn’t actually count as a view for the files and so the server thought the files weren’t being used anymore and deleted them.
I have fixed this in the next version of pixeldrain, but I don’t know when I’ll be able to publish it. It’s a big update and I have very little time to work on it (less than two hours a day). Also, because there are so many changes to the database the website will also have to go offline for a few hours, and I need to schedule that.
Hope it doesn’t bother anyone too much, sorry for the inconvenience.
This makes it easier to find the website on search engines. Uploaded files will still automatically get the shorter pixeldra.in domain name though.
I’m currently working on the file size limit. I think it might be better to set a daily limit per IP address, and no limit for single files. I had in mind to set the daily limit to 1 or 2 GB, if I were to set it to 2 GB that means that one individual file could be up to 2 GB in size! But once you’re finished uploading that mega file you won’t be able to upload anything for 24 hours. This also makes it possible to host big videos on pixeldrain, or game installers or whatever. Of course this also makes management of payment options easier too (more money = higher daily limit) but that’s all future talk, I haven’t even thought about how to implement payments yet.
Last weekend I went to LowLands Festival, and it was freaking amazing! Here’s a little video I made of the Chemical Brothers: http://pixeldrain.com/u/1nCEWZ (WARNING, it’s loud!), I had the time of my life! But that also meant I wasn’t able to update pixeldrain for a while, now I got to get back in that rhythm. Also school will be starting next week for me so that will also slow down development a bit (although I’m off every thursday, yay!).
Please tell me what you think in the comments!
It was quite nerve wrecking because not everything went as planned, but I managed to fix it all and all previously uploaded files should still be available.
I have actually been procrastinating this for a while as I knew it was going to be hard and stressful, but I’m glad I got it over with :D.
All files that were uploaded to the testing site (:8080) have been deleted (not entirely on purpose, but it was for testing anyway so no big loss).
There is now a page where you can view all files you have uploaded: http://pixeldra.in/history
A fully documented API, feel free to build applications around PixelDrain, it would be an honor. Also tell me when you need a feature that hasn’t been implemented yet. http://pixeldra.in/api
File lists can now be created from the Home page. All you need to do is upload some files and click the “Create List” button, enjoy!.
The UI on the viewer page can now be collapsed for a complete distraction free, full screen experience.
Lots of smaller improvements.
Improvements to list creation like sorting files.
Thumbnail generation, I’ve already thought this one out and it should not take too long. Thumbnails will be used to give a small (100*100px) preview of the files you have uploaded.
Improvements to the upload history browser: clearing history, sorting files, creating lists out of old files.
So the past weeks I’ve rewritten the entire website from PHP to Spring Boot. There are a few reasons behind this decision:
- I’m way better at Java than PHP, this means I can speed up development quite a lot by working in my favorite language. I initially made it in PHP because I wanted to get better at it, but it quickly grew into a big mess.
- Using Java gives me a lot more control over the system that the application is running on, like easier managing of the thousands of files this site is going to host.
- More control over the web protocols the site uses, easy configuration of HTTP headers or maybe Websocket connections.
- Creating a REST API using Spring Boot is about as easy as banging rocks together, I already have a fully functioning API, just need to write some docs for it.
Here is another preview of the possibilities using file lists on PixelDrain: http://pixeldra.in/u/TNfcUQ. I downloaded all episodes of my favorite podcast and dragged them into the PixelDrain home page and BAM, I had an autoplaying playlist to listen to while programming.
Also, as a tribute to PixelDrain being able to play WebM files, here’s something I made: http://pixeldra.in/u/j2tsIN
This is where I’ll keep you up-to-date with the latest changes on http://pixeldrain.com/
I’m going to start with adding all the update posts that I put on other sites like reddit and voat