SitePoint Sponsor |
|
User Tag List
Results 1 to 8 of 8
-
Apr 22, 2009, 07:22 #1
- Join Date
- Apr 2009
- Posts
- 4
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Sorting incoming files through PHP and FTP
I'm working on developing a web app that will let a recording artist share and send recorded sound files with his clients.
Ideally I'd have the artist's clients upload their large files via FTP to the server (files are around 1GB--web browser uploader wouldn't work). The artist would then record his part, upload it to the server, and his clients could log in to the site and download it via HTTP or FTP.
My question is what would be the best way to manage the incoming and outgoing files? I have two possible ideas:
1. Set up a PHP or bash script that is triggered whenever a new file comes into the uploads folder and make the clients name their files a certain way so that they get sorted (e.g. client01-recording.zip would get moved to client1/ so the artist could get it (and so the uploads folder would stay clean and anonymous)
2. Somehow wrangle the server to allow different FTP users and sort based on that (e.g. upload+client1@ftp.example.com would put the file in client1/)
What would be the best (and most secure) way to manage something like this?
Thanks!
-
Apr 22, 2009, 07:53 #2
- Join Date
- Mar 2008
- Posts
- 1,149
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
#2 would be more secure and be less awkward.
-
Apr 22, 2009, 07:58 #3
- Join Date
- Apr 2009
- Posts
- 4
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Any ideas on how to do something like that?
-
Apr 22, 2009, 08:16 #4
- Join Date
- Mar 2008
- Posts
- 1,149
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
It depends on the FTP server that you are using. What is your setup? Are you on a dedicated server?
-
Apr 22, 2009, 08:35 #5
- Join Date
- Apr 2009
- Posts
- 4
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
My client's site is on Verio.com, which I think is shared rather than dedicated, but I could move hosts if needed (maybe to a dedicated Media Temple server or something...)
I'm also considering setting up an EC2 instance so I can do it all with a LAMP stack and S3, but I've never done that...
-
Apr 22, 2009, 09:59 #6
- Join Date
- Mar 2008
- Posts
- 1,149
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Can you presently add accounts? If so, how do you do it?
Do you know what FTP server software you use?
-
Apr 22, 2009, 10:03 #7
- Join Date
- Apr 2009
- Posts
- 4
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Right now the only way to do it is to use the cPanel and add accounts manually, linking them to different home folders. Sadly, it looks like this is the only way I can get this to work unless I roll my own FTP system...
-
Apr 22, 2009, 12:04 #8
- Join Date
- Mar 2008
- Posts
- 1,149
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
If you roll your own FTP server, then you probably need a dedicated server. If you do choose this route, there are some FTP server libraries that you can use to hack together a reliable FTP server quickly. Python has pyftplib for example.
If you're going to stick with a shared hosting environment, then you probably want to do option #1, because it's much easier and and more easily maintainable.
Bookmarks