I'm very very new to python. I have a HTML code with POST method to upload a file, then I have python code to receive the file and save it to a FTP server. My python code so far is :
berkas = request.FILES['file']
filename = "test_send_file.jpg"
upload_folder = '/var/www/uploads/target_folder/'
handle_uploaded_file(join(upload_folder, filename), berkas)
Using those codes I got Permission Denied when uploading the file. I know the missing part is where I have to set FTP server address and it's username & password, but I don't know how to that. So, how to do it ?
Or, is there easier way to solve my "POST upload then save to FTP" problem ? Thank you before.