Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Web Coding › I made a website that lets you email any size file. What do you think?
New Posts  All Forums:Forum Nav:

I made a website that lets you email any size file. What do you think?

post #1 of 10
Thread Starter 
Hey guys. Since school let a week or so ago I've been working on a way to email files that are over Gmail's 25MB limit. What I came up with is this pretty simple website with a standard email form. In order to circumvent any sort of limit on filesize the file is uploaded to my server rather than attached to the email, and a link to download the file is emailed to the recipient. It should be noted that I do have a limit of 1GB (which I think is extremely generous).

Now I understand the reason why email services limit their filesize, but I'm not really worried about thousands of people uploading 1GB files... at least I hope that doesn't happen. Either way, this is more of a proof of concept anyway. So go check it out here, and let me know what you think!
Edited by Seventh Badger - 1/1/12 at 10:00pm
Viking
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i5 2500K @ 4.8 GHz 1.45V P8Z68-V GEN3 [2x] EVGA GeForce GTX 570 SLI [2x] Kingston HyperX 4GB 1600MHz 
Hard DriveHard DriveCoolingCooling
Crucial M4 128GB [2x] WD 320GB XSPC Single Bay Reservoir Swiftech MCP655 
CoolingCoolingOSPower
XSPC Raystorm XSPC EX240 Windows 7 Pro 64-bit Corsair HX850 
Case
Corsair Obsidian 650D 
  hide details  
Reply
Viking
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i5 2500K @ 4.8 GHz 1.45V P8Z68-V GEN3 [2x] EVGA GeForce GTX 570 SLI [2x] Kingston HyperX 4GB 1600MHz 
Hard DriveHard DriveCoolingCooling
Crucial M4 128GB [2x] WD 320GB XSPC Single Bay Reservoir Swiftech MCP655 
CoolingCoolingOSPower
XSPC Raystorm XSPC EX240 Windows 7 Pro 64-bit Corsair HX850 
Case
Corsair Obsidian 650D 
  hide details  
Reply
post #2 of 10
Nice work :-)

I did some previous work as a userscript for chrome/firefox, never brought my project to a close. My main idea was to leverage Dropbox or other storage services as the means by which to transfer files. I found this to work really well, they provide gorgeous APIs :-)

I didn't look too closely at your implementation, but my script simply attached an html file containing a link to the file you uploaded via Dropbox.


Great work
For sale
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7-920 Asus P6T Deluxe Asus GTX460 TOP 768mb G Skill ECO 1600 CAS7 1.35V 
Hard DriveOptical DriveOSMonitor
2x Vertex 60 GB raid[0] Asus DVDRW W7,Ubuntu 2 xAsus VH236H 
KeyboardPowerCaseMouse Pad
Razer Ultra X3 1000W HAF 932 My Desk 
  hide details  
Reply
For sale
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7-920 Asus P6T Deluxe Asus GTX460 TOP 768mb G Skill ECO 1600 CAS7 1.35V 
Hard DriveOptical DriveOSMonitor
2x Vertex 60 GB raid[0] Asus DVDRW W7,Ubuntu 2 xAsus VH236H 
KeyboardPowerCaseMouse Pad
Razer Ultra X3 1000W HAF 932 My Desk 
  hide details  
Reply
post #3 of 10
Looks great man, just make sure it's locked down tight, so many ways for a bot to take over the form and start spamming.
post #4 of 10
Thread Starter 
Thanks guys. Yeah I considered using a captcha, but they just look so ugly. I figured that being required to select a file to upload is a pretty effective antispam mechanism in itself.
Viking
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i5 2500K @ 4.8 GHz 1.45V P8Z68-V GEN3 [2x] EVGA GeForce GTX 570 SLI [2x] Kingston HyperX 4GB 1600MHz 
Hard DriveHard DriveCoolingCooling
Crucial M4 128GB [2x] WD 320GB XSPC Single Bay Reservoir Swiftech MCP655 
CoolingCoolingOSPower
XSPC Raystorm XSPC EX240 Windows 7 Pro 64-bit Corsair HX850 
Case
Corsair Obsidian 650D 
  hide details  
Reply
Viking
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i5 2500K @ 4.8 GHz 1.45V P8Z68-V GEN3 [2x] EVGA GeForce GTX 570 SLI [2x] Kingston HyperX 4GB 1600MHz 
Hard DriveHard DriveCoolingCooling
Crucial M4 128GB [2x] WD 320GB XSPC Single Bay Reservoir Swiftech MCP655 
CoolingCoolingOSPower
XSPC Raystorm XSPC EX240 Windows 7 Pro 64-bit Corsair HX850 
Case
Corsair Obsidian 650D 
  hide details  
Reply
post #5 of 10
Agreed about CAPTCHA ugliness.
If you feel up to it, reCAPTCHA leaves the possibility of styling your own CAPTCHA. You just have to make a stylesheet encompassing all the elements of the CAPTCHA and make it look how you like it (link).

I can see this becoming very useful, especially for people wanting to send video to others. Most professionals are probably going to use a cloud service, but for mom and pop wanting to send the holiday vacation video from their brand new 1080p video camera, this would be awesome.
The next step would be to find a way to integrate it directly into Gmail, either through a plugin or browser add-on (don't know much of anything in that area of things). If you market it well you could probably make this quickly gain in popularity!

EDIT:
Sorry, other security question.
How exactly are you uploading the file? It's being uploaded outside of the root right? And then the download link is a PHP page which grabs that file for download?
Just making sure I wouldn't be able to, say, upload a PHP file and then execute by typing in the link to it.

Testing it right now but still haven't received the e-mail.
Edited by crazyap7 - 12/23/11 at 12:49am
post #6 of 10
Thread Starter 
Yeah my original goal was to make it a gmail plugin. Perhaps I'll continue on to that eventually, but I'm pretty happy with the way this turned out.

Yes the file is being uploaded outside of webroot. I found that the best way of making it secure without actually having the users log in with a username and password was to create a unique authentication key for every file that is uploaded, which is stored in a file (also outside of root). That key is encoded using my super secret cipher and sent along in the download URL as a GET variable. The link is directly to a PHP script that authenticates the user then redirects to a download script with encrypted information for the correct file to download. So anyone who has that link could download that file, but guessing the link for any given file is pretty much impossible. But if you have any suggestions on how I could improve this, please let me know. I kind of just went at it without any real knowledge of security conventions.

As for the email not showing up, have you checked your spam folder? I had to create a filter because it kept sending it to spam, but I've tested it probably 100+ times with a wide range of file sizes and haven't ever not received an email.

EDIT: Wow you're right it's not sending. I have no idea why it's not, but I will look into it. Sorry about that thumbsdownsmileyanim.gif
Edited by Seventh Badger - 12/23/11 at 10:15am
Viking
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i5 2500K @ 4.8 GHz 1.45V P8Z68-V GEN3 [2x] EVGA GeForce GTX 570 SLI [2x] Kingston HyperX 4GB 1600MHz 
Hard DriveHard DriveCoolingCooling
Crucial M4 128GB [2x] WD 320GB XSPC Single Bay Reservoir Swiftech MCP655 
CoolingCoolingOSPower
XSPC Raystorm XSPC EX240 Windows 7 Pro 64-bit Corsair HX850 
Case
Corsair Obsidian 650D 
  hide details  
Reply
Viking
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i5 2500K @ 4.8 GHz 1.45V P8Z68-V GEN3 [2x] EVGA GeForce GTX 570 SLI [2x] Kingston HyperX 4GB 1600MHz 
Hard DriveHard DriveCoolingCooling
Crucial M4 128GB [2x] WD 320GB XSPC Single Bay Reservoir Swiftech MCP655 
CoolingCoolingOSPower
XSPC Raystorm XSPC EX240 Windows 7 Pro 64-bit Corsair HX850 
Case
Corsair Obsidian 650D 
  hide details  
Reply
post #7 of 10
Thread Starter 
Sorry again, but I'm going to have to leave it locked down for a while. I've got to leave to go see my parents for Christmas in like 10 minutes and I'm not sure how much opportunity I will have to work on it then.
Viking
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i5 2500K @ 4.8 GHz 1.45V P8Z68-V GEN3 [2x] EVGA GeForce GTX 570 SLI [2x] Kingston HyperX 4GB 1600MHz 
Hard DriveHard DriveCoolingCooling
Crucial M4 128GB [2x] WD 320GB XSPC Single Bay Reservoir Swiftech MCP655 
CoolingCoolingOSPower
XSPC Raystorm XSPC EX240 Windows 7 Pro 64-bit Corsair HX850 
Case
Corsair Obsidian 650D 
  hide details  
Reply
Viking
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i5 2500K @ 4.8 GHz 1.45V P8Z68-V GEN3 [2x] EVGA GeForce GTX 570 SLI [2x] Kingston HyperX 4GB 1600MHz 
Hard DriveHard DriveCoolingCooling
Crucial M4 128GB [2x] WD 320GB XSPC Single Bay Reservoir Swiftech MCP655 
CoolingCoolingOSPower
XSPC Raystorm XSPC EX240 Windows 7 Pro 64-bit Corsair HX850 
Case
Corsair Obsidian 650D 
  hide details  
Reply
post #8 of 10
Thread Starter 
Well I figured out the problem. Once you pressed the Send button, I was using Javascript to disable it (to prevent multiple submits), which in effect was preventing the form from submitting at all. I looked around and some people said I could manually submit the form using the document.form.submit() function, but that wasn't working for me either. So until I can find a solution, I'm just going to leave the Send button enabled while the form is submitting.

EDIT: Fixed above problem.
Edited by Seventh Badger - 12/23/11 at 9:13pm
Viking
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i5 2500K @ 4.8 GHz 1.45V P8Z68-V GEN3 [2x] EVGA GeForce GTX 570 SLI [2x] Kingston HyperX 4GB 1600MHz 
Hard DriveHard DriveCoolingCooling
Crucial M4 128GB [2x] WD 320GB XSPC Single Bay Reservoir Swiftech MCP655 
CoolingCoolingOSPower
XSPC Raystorm XSPC EX240 Windows 7 Pro 64-bit Corsair HX850 
Case
Corsair Obsidian 650D 
  hide details  
Reply
Viking
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i5 2500K @ 4.8 GHz 1.45V P8Z68-V GEN3 [2x] EVGA GeForce GTX 570 SLI [2x] Kingston HyperX 4GB 1600MHz 
Hard DriveHard DriveCoolingCooling
Crucial M4 128GB [2x] WD 320GB XSPC Single Bay Reservoir Swiftech MCP655 
CoolingCoolingOSPower
XSPC Raystorm XSPC EX240 Windows 7 Pro 64-bit Corsair HX850 
Case
Corsair Obsidian 650D 
  hide details  
Reply
post #9 of 10
I'll try it again in a bit.

And as far as security, looks like you've got the file upload/download down pretty good. As long as you sanitize the GET input in your PHP download script, you should be good to go.

And I assume all the text fields in the form for To:, From: etc. are sanitized as well before being plugged into the email command.
post #10 of 10
Thread Starter 
Quote:
Originally Posted by crazyap7 View Post

As long as you sanitize the GET input in your PHP download script, you should be good to go.
And I assume all the text fields in the form for To:, From: etc. are sanitized as well before being plugged into the email command.

Of course! thumb.gif
Viking
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i5 2500K @ 4.8 GHz 1.45V P8Z68-V GEN3 [2x] EVGA GeForce GTX 570 SLI [2x] Kingston HyperX 4GB 1600MHz 
Hard DriveHard DriveCoolingCooling
Crucial M4 128GB [2x] WD 320GB XSPC Single Bay Reservoir Swiftech MCP655 
CoolingCoolingOSPower
XSPC Raystorm XSPC EX240 Windows 7 Pro 64-bit Corsair HX850 
Case
Corsair Obsidian 650D 
  hide details  
Reply
Viking
(13 items)
 
  
CPUMotherboardGraphicsRAM
Intel Core i5 2500K @ 4.8 GHz 1.45V P8Z68-V GEN3 [2x] EVGA GeForce GTX 570 SLI [2x] Kingston HyperX 4GB 1600MHz 
Hard DriveHard DriveCoolingCooling
Crucial M4 128GB [2x] WD 320GB XSPC Single Bay Reservoir Swiftech MCP655 
CoolingCoolingOSPower
XSPC Raystorm XSPC EX240 Windows 7 Pro 64-bit Corsair HX850 
Case
Corsair Obsidian 650D 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Web Coding
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Web Coding › I made a website that lets you email any size file. What do you think?