File manager

File manager

crush123crush123 Posts: 417Questions: 126Answers: 18

I am using the file upload class on a couple of projects to handle document management and image files.

Sometimes however, the image file I want to use is already on the server, so doesn't need to be uploaded.

Is there a way I can utilise editor as a file manager and browse the local server folders and upload only if the file is not present ?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Answer ✓

    Do you store a hash of the file so you know if it unique on the server or not? You could in theory return the id pointing to the existing file - that would of course need a custom upload action to check if the file exists or not and then return the corresponding ID. A database lookup of the file's hash would work for that (not something I've tried, but I don't see any reason why it wouldn't work).

    Allan

This discussion has been closed.