Website - creating a place to upload files to

Gwendolini

macrumors 6502
Original poster
Feb 5, 2015
486
100
random
Hi.

I have a website, my own domain, and I want to create a place on that website where users can upload files to.

Is that technically possible without FTP access? Or does one have to create a guest user FTP access one could control via a self built website?
 

D.T.

macrumors G4
Sep 15, 2011
10,518
10,064
Vilano Beach, FL
I'd assume without any understanding of your biz, customer model, etc., you'd want to build a secure web UI where users can authenticate, and upload using a browser (i.e., like uploading images to this BB).

Personally, I wouldn't upload and serve static content off my web server, I'd use a service like S3, but that does add a little more complexity to the whole solution (but in the end, is much better).

You also have to consider security. Are the uploads meant to be secured, so not anyone can download them? If they are, and you provide an easily deciphered path, other users could easily download files.
 

ocabj

macrumors 6502a
Jul 2, 2009
546
188
You can create a web form that accepts user uploaded files. Granted, you'll want to spend time on the validation code processing the files submitted in that form to ensure no malicious activity is successful (e.g. injection, overflow, etc).
 

960design

macrumors 68030
Apr 17, 2012
2,983
934
Destin, FL
Hi.

I have a website, my own domain, and I want to create a place on that website where users can upload files to.

Is that technically possible without FTP access? Or does one have to create a guest user FTP access one could control via a self built website?
Two ways:
1) As already mentioned: Web form, ensure type= is set appropriately, tons of validation; both pre and post server side.
2) WebDav. Not super hard, nor super easy but definitely AWESOME. I haven't used it in productions sites, but do run it locally.
 

Gwendolini

macrumors 6502
Original poster
Feb 5, 2015
486
100
random
Two ways:
1) As already mentioned: Web form, ensure type= is set appropriately, tons of validation; both pre and post server side.
2) WebDav. Not super hard, nor super easy but definitely AWESOME. I haven't used it in productions sites, but do run it locally.
Thanks, it seems WebDAV is limited to 4 GB for whatever archaic reasons.

Do you have a WebDAV example for me to look at, maybe?

I tried dabbling in a simple upload form, but to do it right, I must continue searching.
I already used HTACCESS to limit downloadability.

Ah, why can't there be something like After Effects for web design.
 

960design

macrumors 68030
Apr 17, 2012
2,983
934
Destin, FL
Thanks, it seems WebDAV is limited to 4 GB for whatever archaic reasons.
And this is a problem for you? Are you uploading single file star charts for route planning or human DNA basepairs?

Do you have a WebDAV example for me to look at, maybe?
Google has better and more professional tutorials than I can give in a message reply

I already used HTACCESS to limit downloadability.
Yeah, that one is very 1986, works well, simple, but not easily scalable.
 

Gwendolini

macrumors 6502
Original poster
Feb 5, 2015
486
100
random
And this is a problem for you? Are you uploading single file star charts for route planning or human DNA basepairs?
As I handle 9 GB and 13 GB and bigger file sizes on occasion, it is kind of a problem.


Google has better and more professional tutorials than I can give in a message reply
I see.


Yeah, that one is very 1986, works well, simple, but not easily scalable.
Do you know a better way then?
 

D.T.

macrumors G4
Sep 15, 2011
10,518
10,064
Vilano Beach, FL
Do you know a better way then?
Maybe if you outlined your solution a little more, we could provide some better input.

I've been developing for over 25 years and others that post here have some great insight ... I guarantee I/we can provide some general design/architecture guidance, but we're sort of just throwing darts in a dark room. :)
 

Gwendolini

macrumors 6502
Original poster
Feb 5, 2015
486
100
random
Maybe if you outlined your solution a little more, we could provide some better input.

I've been developing for over 25 years and others that post here have some great insight ... I guarantee I/we can provide some general design/architecture guidance, but we're sort of just throwing darts in a dark room. :)
Sorry, I am new at this, thus I might not have the proper words for what I want.

What specifically do you need to know?


I can try to explain some more if you want:

I have a website called Gwendi.com (not really, just an example) and I want users to give the opportunity to upload a file or three if necessary, hopefully in a secure section of the website (currently via HTACCESS).
Those users are not random users, but colleagues or friends that I share data with on a work basis, as WeTransfer or Dropbox is not always ideal.


In the end it should look like this, only a bit less professional of course:


BeatifulWebsiteWithUploadFunction.png



Boah, that lucks beautiful. Really. Reminds of the WWW of the 1980s.​
 

D.T.

macrumors G4
Sep 15, 2011
10,518
10,064
Vilano Beach, FL
In between things this morning, figured I'd pop in :D

So, is everyone a peer, that is: can everyone upload and download equally? There's no user roles, access privs, if you can upload, you can upload for anyone to download - the access control is on or off.

If this is some kind of collaborative workflow, where everyone is at the same access level and they're known colleagues/friends, I'm curious why a file sharing solution isn't the best option? You already mentioned DropBox ... have you checked out Google Drive? Box? OneDrive?

They provide access controls, invites, auto-compression, categorization, folders plus nice client apps for desktop and mobile.

Second bottle got done in - sending you a 3rd bottle :D
 

960design

macrumors 68030
Apr 17, 2012
2,983
934
Destin, FL
As I handle 9 GB and 13 GB and bigger file sizes on occasion, it is kind of a problem.
Wow. Don't recall ever, in 30+ years of code development and 15+ years web development ever having to upload 9G+ files.

But here it goes. You will have to develop a web form to do this. Ensure your server settings have not set a limit to something like 2GB for some crazy reason. I would build a simple HTML5 / javascript drag and drop interface. That way you would log in, simply drag and drop the file in a drag/drop region of the web page and have javascript report back on the progress and success or failure. Google the same for tons of tutorials on how to do this. It is easier than it sounds.

As a fair warning, setting up your server to handle 9GB+ files could be abused for DOS attacks. Depending on your site type/domain this may or may not be an issue at all.
 

Gwendolini

macrumors 6502
Original poster
Feb 5, 2015
486
100
random
So, is everyone a peer, that is: can everyone upload and download equally? There's no user roles, access privs, if you can upload, you can upload for anyone to download - the access control is on or off.
For now it should only be for uploading, thus I can access it via FTP software. I did not think about sharing that way, as if it would have to happen, I would just move the uploaded file to another section and give access to it that way.
I also thought about getting a NAS or connecting an HDD to my AEBS (which is sadly after the router) to do it that way - let users upload files to that space, but most documents I could find are quite a bit old. For now it is on hold.

If this is some kind of collaborative workflow, where everyone is at the same access level and they're known colleagues/friends, I'm curious why a file sharing solution isn't the best option? You already mentioned DropBox ... have you checked out Google Drive? Box? OneDrive?
Seeing as the target is my "server" (rented) and those other services do not offer such big file uploads unless paid for (and I already have 30 GB of storage on "my server"), they are put out of consideration.

They provide access controls, invites, auto-compression, categorization, folders plus nice client apps for desktop and mobile.
All very nice features, but as it would not be a daily used feature only for two to three projects in the next months with less than a dozen collaborators, it might be overkill.

Second bottle got done in - sending you a 3rd bottle :D
TetraPak it is.
 

Gwendolini

macrumors 6502
Original poster
Feb 5, 2015
486
100
random
Wow. Don't recall ever, in 30+ years of code development and 15+ years web development ever having to upload 9G+ files.
As I work with video, 9 GB is not that seldom. Just recently for a music video I edited I had to share the ProRes HQ 1080p master and that file was over 5 GB in size, while only being 3m20s long.

But here it goes. You will have to develop a web form to do this. Ensure your server settings have not set a limit to something like 2GB for some crazy reason. I would build a simple HTML5 / javascript drag and drop interface. That way you would log in, simply drag and drop the file in a drag/drop region of the web page and have javascript report back on the progress and success or failure. Google the same for tons of tutorials on how to do this. It is easier than it sounds.
It sounds easy, I already found some code for it, but it is rather clunky.
Do you maybe have an example or tutorial in mind or proper search terms I could use?

As a fair warning, setting up your server to handle 9GB+ files could be abused for DOS attacks. Depending on your site type/domain this may or may not be an issue at all.
Hopefully it will be the Russians, since they seem to visit my site daily dozens of times.
And what do you mean with "site type/domain" and "issue"? I have a normal website via a domain hosting service.
It promises security, but of course offers advanced security for more money.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.