# Use the Array form to enforce an extension in the filename:
file = Tempfile.new(['hello', '.jpg'])
file.path # => something like: "/tmp/foo2843-8392-92849382--0.jpg"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1941 次 |
| 最近记录: |