Generate unique time() filenames for file uploads inside Repeater
Im trying to generate filenames based on the time() method using getUploadedFileNameForStorageUsing inside a repeater.
The problem is that all files are generated using the same time value and are overriden by the last file.
This is the component (i dont want to include the original file name):
Solution:Jump to solution
time()
returns timestamp with seconds precision so its normal behavior because its execution time might be under 1s
you should use now()->getTimestampMs()
or if you want more precision now()->getPreciseTimestamp(6)
...1 Reply
Solution
time()
returns timestamp with seconds precision so its normal behavior because its execution time might be under 1s
you should use now()->getTimestampMs()
or if you want more precision now()->getPreciseTimestamp(6)