如何在powermail中激活随机文件名 [英] How to activate randomized filenames in powermail

查看:54
本文介绍了如何在powermail中激活随机文件名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用户可以上传文件的表单.他们可以上传 3 个文件,每个文件都需要有一个唯一的名称.因此,即使每次我在电子邮件中需要不同名称的人上传相同的文件,我也会从表单中获取.

所以我尝试使用 randomizeFileName.

我希望有人能帮助我.非常感谢!

解决方案

根据扩展中包含的安装文件,Powermail 7.x 的正确语法是:

plugin.tx_powermail.settings.misc.randomizeFileName = 1

randomizeFileName = 1 是 Powermail 7.x 中的默认值!

您必须在 Typoscript Constant 上设置它,而不是在 Typoscript Setup 中设置:

在 Typoscript 设置中,这可能有效.(未测试)

plugin.tx_powermail.settings.Pi2.misc.file.randomizeFileName = 1

阅读源代码以了解更多信息:https://github.com/einpraegsam/powermail/blob/develop/Configuration/TypoScript/Powermail_Frontend/setup.txt

或者文档:https:///docs.typo3.org/typo3cms/extensions/powermail/stable/ForAdministrators/BestPractice/MainTypoScript/Index.html

i have a form where user could upload files. There are 3 files they could upload and each of them need to have an unique name. So even the person upload the same file everytime i neet different names for it in the email, i get from the form.

So i try to use randomizeFileName. https://github.com/einpraegsam/powermail/blob/develop/Configuration/TypoScript/Main/setup.txt#L538

Cause i dont have the randomizeFilename in my constants.txt it try to enter it in my setup.txt with a real value.

# File upload settings
file {
  folder = {$plugin.tx_powermail.settings.misc.uploadFolder}
  size = {$plugin.tx_powermail.settings.misc.uploadSize}
  extension = {$plugin.tx_powermail.settings.misc.uploadFileExtensions}
  randomizeFileName = 1
}

But sadly that dont work. The file issues-1.pdf still has the same name (+ a suffix cause i tried it a lot time )

I hope someone can help me. Thank you very much!

解决方案

Based on the setup file included in the extension, the correct syntax for Powermail 7.x would be:

plugin.tx_powermail.settings.misc.randomizeFileName = 1

randomizeFileName = 1 is the default value in Powermail 7.x!

You have to set this over Typoscript Constant, not in Typoscript Setup:

In Typoscript Setup this may work. (Not Tested)

plugin.tx_powermail.settings.Pi2.misc.file.randomizeFileName = 1

Read the source code to see more: https://github.com/einpraegsam/powermail/blob/develop/Configuration/TypoScript/Powermail_Frontend/setup.txt

Or the documentation: https://docs.typo3.org/typo3cms/extensions/powermail/stable/ForAdministrators/BestPractice/MainTypoScript/Index.html

这篇关于如何在powermail中激活随机文件名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆