Jump to content

Filesharing...advanced...


ajlisowski

Recommended Posts

So I am working on an intranet application for a company and right now one can upload files to share with other users. The following request was just submitted by my boss...

 

"Marketing would like to use the project system to attach media files for unified storage.  The linux box is not a good place for holding that amount of data.  Need to add an option to document function to choose a storage folder.  The folder could be a physical drive on the machine running the browser or a network share the user has access to.  If this option is chosen, then instead of uploading the files, it would display the contents of the selected folder."

 

So basically, he wants instead of uploading, to allow users to select a folder locally and have the intranet system somehow display this to other members.

 

I am 90 percent sure this is not possible with PHP. I dont see how it would be. Unless I could grab the users IP and then connect to that IP somehow and crawl for folders if its shared. I have no idea how I would do this though, and I still doubt its possible.

 

Any advice? Any alternative ideas if this isnt possible? Also what is a good way to explain to my boss this is not possible without sounding like I dont know what Im talking about? Since, really I dont know much about networks so I dont know if theres some fancy way I can grab said information.

 

Any help would be grand.

 

 

Link to comment
Share on other sites

I was not the one who set up the set up the web server. Im relatively inexperienced with linux and apache, though Im learning.

 

I assume the mounting would have to be done on the server itself, I couldnt run PHP code which mounts to a drive could I? I suppose I could run shell commands via php to mount to the drive then go from there.

 

However, is there anyway to have PHP get the IP address of the user and then grab shared data from there? Everyone would be on the same network...but it just doesnt seem like it would be possible.

Link to comment
Share on other sites

Yeah... that's probably not possible, assuming the clients have firewalls on their machines, etc.

 

The best way to mount the web server to other network shares would be to log into the web server (either directly or via SSH). Then you could distribute the files across all of the connected network shares.

 

I'm not even sure if this is the best solution, though. Maybe consider building a SAN if storage is a problem. Or even just a large fileshare somewhere. Mount that large fileshare on the webserver to a folder, and then when uploading files place them in that mounted folder.

Link to comment
Share on other sites

Yeah, I was just experimenting a bit with our network and mounting on my VM. I think the best solution would be to simply create a fileshare, or a folder within an existing share, and have the server admin have the apache server mount to it.

 

This way I dont have to have shell access for the PHP scripts to mount, and I dont have to worry about trying to mount to someone a folder which may not be shared, and may not even be there.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.