Store generated file inside created path

The program doesn’t found the path
I want to change

File.write(“/tmp/#{photo}”, photo, [:binary])

to something like this :

File.write(“/priv/uploads/#{photo}”, photo, [:binary])

but the path is not found , this return :

[{:error, :enoent}]