Hi Mike,

As is explained in the docs, the FR must be referenced by a data value. If
the FR is referenced it will not be deleted.

The FR object is not usable by itself, so the upload to the
api/*/fileResources is step 1 of 2 in the process of uploading a file (it
needs to be tied to a DV afterwards).

In practice this means that in order to use FR you need to create data
elements (and datasets) to contain your files.

Hope that answers your question. If not, please let me know.

On Mon, Jul 25, 2016 at 7:57 AM, Mike Nelushi <mikeevolut...@gmail.com>
wrote:

> Hi Halvdan/Morten,
>
> There seem to be a cleanup task which is ran at 2AM every 24H which
> necessary maintenance which removes orphaned files (FileResources) which
> have been posted to the instance but are marked for deletion as Halvdan
> explained here
> <http://dhis-developers-list.1563109.n2.nabble.com/Re-Dhis2-users-Nightly-Batch-Jobs-td7604891.html>.
> And from File resource constraints explained *here
> <http://dhis2.github.io/dhis2-docs/2.23/en/developer/html/ch01s12.html#d0e2396>
>  "Any
> file resources which are in this state and are older than two hours will be
> marked for deletion and will eventually be purged from the system." *
>
> Our new application allows users to upload files and would like to prevent
> this from happening.
> How do we stop the system from running this file deletion task or tag the
> files to not be deleted?
>
> Please advice.
>
> Regards,
> Mike
>



-- 
Halvdan Hoem Grelland
Software developer, DHIS 2
University of Oslo
http://www.dhis2.org <https://www.dhis2.org/>
_______________________________________________
Mailing list: https://launchpad.net/~dhis2-devs
Post to     : dhis2-devs@lists.launchpad.net
Unsubscribe : https://launchpad.net/~dhis2-devs
More help   : https://help.launchpad.net/ListHelp

Reply via email to