1👍
I see in your file path error, a combination of slash and backslash.
replace ‘/’ to ‘\’ if your application run on windows system.
path = settings.MEDIA_ROOT
os.remove(os.path.join(path, file_name.replace('/', '\')))
Source:stackexchange.com
1👍
I see in your file path error, a combination of slash and backslash.
replace ‘/’ to ‘\’ if your application run on windows system.
path = settings.MEDIA_ROOT
os.remove(os.path.join(path, file_name.replace('/', '\')))