[BangPypers] File upload to Server using FTP in Django?

sameerkatti sameerkatti at live.com
Tue Sep 24 18:51:47 CEST 2013


I am using the Django Framework and i have written a small snippet in a
function in views.py
The same function is called in the urls.py .

The code in the Views is 

/session = ftplib.FTP('abc.com','Username','Password')
file = open('filename','rb')               
session.storbinary('STOR filename', file)  
file.close()                                 
session.quit()/

I am trying to upload a random file through the template, it throws a error
as
*'cannot concatenate 'str' and 'InMemoryUploadedFile' objects'*

I'm very new to Django and Python.








--
View this message in context: http://python.6.x6.nabble.com/File-upload-to-Server-using-FTP-in-Django-tp5033494p5033548.html
Sent from the Bangalore (BangPypers) mailing list archive at Nabble.com.


More information about the BangPypers mailing list