我正在尝试使用laravel Storage上传文件,
$request->file('input_field_name')->store('directory_name');但是它使用随机字符串名称将文件保存在指定目录中.
现在我想用自定义名称保存上传的文件,即当前时间戳与实际文件名连接.是否有任何最快速,最简单的方法来实现此功能.
我有一些选择,最后一个选项是“其他”。
当用户从下拉列表中选择其他选项时,我想显示文本字段。
我正在使用普通的 html,对不起,我是 AMP 初学者,我找到了一些带有 json 选项的 amp-list 示例,但我不知道如何实现,因为我在下拉列表中的选项有限。
<select data-type="text" id="cuisine" name="cuisine" required>
<option value="german">German wine</option>
<option value="baden">Baden cuisine</option>
<option value="hamburg">Hamburg cuisine</option>
<option value="others">Others</option>
<select>
<div class="form-group hide" id="other_cusone">
<label for="other_city_p" class="active">Other :</label>
<input type="text" id="other_c_p" name="other" placeholder="Other">
</div>
Run Code Online (Sandbox Code Playgroud)
谢谢
我需要将以下 javascript 代码调整为 amp 页面。
<select id="url">
<option value='home'>home</option>
<option value='contact'>contact</option>
</select>
<input type="button" value='ir' onclick='ir()'>
<script>
function ir(){
var url=document.getElementById("url").value;
location.href=url;
}
</script>
Run Code Online (Sandbox Code Playgroud)
这是可能的?
在文档中我没有找到答案。