php - Allow users to upload files from server directory -


      i wrote simple pseudo-cms using php , javascript (mostly jquery). there circumstance users can change source of <img/> tag on given page. want allow them access (browse , select) both remote files (files on there machine) , local files (files on web server). in latter case, wouldn't uploading such, changing source of given <img/> tag existing image on server.

      there no real security concern think, because users have had login point. users in question owners of site, i'm not worried maliciousness on part.

is this:

  1. possible?
    if yes, how?

  2. potentially insecure in way?

thanks

i answering myself, won't mark correct, because don't answer. hope else finds this, , offers better solution.

i using 2 file inputs user being able choose either:

  a. upload desktop (as case) first input

  or:

  b. select pseudo list of files directory on server has been populated php scandir(), , responding select javascript.

it works, don't it, because generating view directory full of images resource intensive, , because requires coding after not selecting file through native browser file dialogues.

feel free offer better solution.


Comments

Popular posts from this blog

How to mention the localhost in android -

php - Calling a template part from a post -

c# - String.format() DateTime With Arabic culture -