Reputation: 3504
Uploades file represented as tmpfile() and will be removed then script exits. How to hardlink this file to keep its content after removing tmpfile?
How to get name of file by its handle?
> a=io.tmpfile()
> print(a)
file (0x20c8790)
> lfs=require"lfs"
> lfs.link(a,"/tmp/aaaa")
stdin:1: bad argument #1 to 'link' (string expected, got FILE*)
stack traceback:
[C]: in function 'lfs.link'
stdin:1: in main chunk
[C]: in ?
This file is too big to copy it by byte to another.
Upvotes: 1
Views: 856