Buy Now
Sign in

file download function doesn't download after moving site from localhost to production

G
gix.vax
hi all
in localhost i have some CCv6 and CF6 that upload, download and save data very well but, putting site on-line, download function doesn't work.
my upload folder is /media/uploads/
(www.mysite.ext/media/uploads/)
i can't use relative path to CCv6 cause upload can come from CCv6 o CF6 that have different paths and cause i want a path for other tasks too.
note that i save in DB and file with "\" not with "/" cause in localhost is the only that work for me
on line it save data to DB and upload file without problem but download and delete file function (PHP unlink) doesn't work.
when i save data i override the field Document in this way
documento:\media\uploads\{var:upload_file.documento.filename}
in database it is shown as \media\uploads\filename.ext
upload function works well
upload directory path : {path:root}\media\uploads\
i try to retrieve file with {path:root}{data:documento} and it says
File does not exist.
i think could be an / or \ ESCAPE problem but i try a lot of things and it doesn't work.
if i try to save data using \media\uploads\filename it save in DB only \media\uploads\
i tryed a lot of combination
/media/uploads/var:upload_file.documento.filename}
\media\uploads\var:upload_file.documento.filename}
/media/uploads//var:upload_file.documento.filename}
etc.
the only that save well and upload is {path:root}\media\uploads\
if i try to open file directly putting the path in browser bar, it works
www.mysite.ext/media/uploads/filename.ext
i try to give all permission (only for test) to the folder and it doesn't work
site is in HTTPS
an help is appreciated
thank you