• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to implement a pic server?

What is the correct way of implementing this type of setup? My best guess is that i should POST to a upload specific ci installation on the pic server that would deal with all file uploads. But then i would have to make a connection to my db.. hmmm, things will get a little more complicated.

..discuss Smile

Why that complicated? Why not just one CI setup with DB in which you store the image data en FTP the image to the pic server? This way your pic server will be dedicated and your application server aswell

I don't see the need to mix seperate functionality.

1: upload
2: store image data in DB (including image location)
3: store image in tmp dir
4: ftp image to pic server ( in specific location? )

Above odering might not be the best.

i do not want to use double the bandwidth on a single image. the point is for my application server bandwidth to be solely dedicated to generated html. Also, the pictures i'm referring to are user uploaded.

So is it safe to say the servers are on different locations or at least not connected to each other? That would have made things a lot simpler.

As for user upload, that shouldn't make a difference. It al depends on how you process the upload.

Back to your question:

I would create an upload form with the action pointing towards the picserver and an ajaxcall from the picserver to the applicationserver with details of the uploaded image.

you would still need 2 CI installations but the picserver only needs a simple upload routine and an ajax call.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.