File Attach - incorrect path

Hi. guys, tell me what is wrong with me in the chunk:

<button data-fancybox="" data-src="[[+url]]" data-type="pdf" class="btn-two">[[+name]]</button>

in data-src=“[[+url]]” - I get : data-src=“//Положение о проведении восьмых Малышевских краеведческих чтений.pdf”

What exactly is wrong here? Where is this chunk processed and what fills the [[+url]] placeholder?

Hi. Instead of a link to the downloaded document, I get this path. ссылка . Look at an example. The pdf document does not open

Again, where is this chunk being processed? What plugin/snippet is involved?

I call in the template

 [[FileAttach?  &tpl=`gallerydoxsm`]]


Sorry, I have never used FileAttach before. Maybe someone else can help you with this.

What version of MODX are you using? FileAttach doesn’t seem to be compatible yet with MODX 3.
What PHP version?

Does this problem occur for all the download files, or only for this specific PDF-file?
Are there any errors that get added to the MODX error log when you call the FileAttach snippet?

MODX Revolution 2.8.5-pl
PHP 7.4
There are some errors, but I do not know if they are related
The page where the snippet is called

thank you. I’ve never used it either

Change the system setting fileattach.files_path to something like mydocuments/. (Put a / at the end. No slash at the beginning.)
Then add the folder “mydocuments” to the file system.

When you upload new files, they get put into the “mydocuments” folder and the [[+url]] placeholder in the chunk should now have the correct value.

1 Like

thank you very much. you are TOP as always

1 Like