Create ElggFile From existing file store in my plugin directory

Hi everyone,

The file plugin provided by default by elgg is useful when we I want to add a file in my social network. it is easy to create a ElggFile through it.  I just have to upload the file using file browser.

Now I am working on a new plugin and I would like to create an ElggFile from existing file already store in my plugin directory.

For instance, in my plugin directory I have a sub-directory called /docs and it contains a file named "sample.doc".

So when a user click on "create new file" I would like to create and store ElggFile from "sample.doc".

Could someone help me ?



Beginning Developers

Beginning Developers

This space is for newcomers, who wish to build a new plugin or to customize an existing one to their liking