Problems, need help? Have a tip or advice? Post it here.
2 posts Page 1 of 1
Hi

In my App I create PDF files from values in CouchCMS and save them e.g. in media/file/...

Works perfectly. But I‘d like to create these files as securefiles, meaning to set the appropriate data to the editable field of type ˋsecurefile‘ in the cloned page.

So I would generate the pdf an save it woth random filename to random foldername (save these values of course), but how to set these values to the securefile editable and get a file id?

Can I do this with couch tags or do I have to insert it woth an sql query?

@edit: eventually like:

Code: Select all
<cms:db_persist
   _invalidate_cache = '0'
   _masterpage       = 'my_template.php'
   _mode             = 'create'
   ...
   securefile=secure_file_path_and_name
   ...
   />


Olliwalli
Hi,

The primary function of type 'securefile' region is allowing uploads from the front-end by untrusted visitors in a secure manner.
That it further allows the files thus uploaded to be downloaded as encrypted links is only secondary.

In your case, as I understood it, the files are not coming from the frontend you don't need to use securefile at all.
For encrypting the links to your files you may use the 'Cloaked links' feature - https://docs.couchcms.com/concepts/cloaked-links.html

Does this help?
2 posts Page 1 of 1
cron