mysql - How to upload to a static content server with php? -


i launching web application serving fair amount of images i'd have main web server , static content server , possibly separate database server later on.

i'd user to:

  1. login , able upload photo
  2. the photo renamed randrom string
  3. the photo processed thumbnail
  4. the photo , thumbnail stored filesystem on static server.
  5. the photo , thumbnail's directory , filename stored in mysql database

the problem don't know how have user instantly upload image separate server.

i thought using amazon s3, can't edit filenames before posting them. (through post, i'd rather not use rest api)

i use php's ftp function upload separate server, i'd dynamically create folders based on properties of image (so don't have images in 1 big folder obviously), don't know how work if used ftp...

or save them locally , use cdn, i'm not familiar cdn's don't know if using them way appropriate or cost-effective.

what options here? i'd images available instantly (no cron jobs/queues)

thanks.

you can create directories on ftp php, should not showstopper.


Comments