I’m trying to associate a video file to a record with a bunch of properties, but can’t seem to allow the user to do everything in one form – name the video, provide description and answer some question, AND upload the file.
Here are the steps I’d like to perform:
- User is served with a page containing a form with the following fields: Name, Description, File selector.
- The file gets stored as a blob and the id gets recorded together with name and description.
Does anyone have any examples of doing this I could learn from or a tutorial you could point me to? The one from google only shows uploading the file and getting redirected to it.
Thanks and sorry for a newbish question!
Here’s the code I’m using to upload images and associate them with articles. The toughest bit was getting the article id to get to the upload handler, I solved it by setting the file name as the article id to get around the problem.
Also you’ll need this http://fabien.seisen.org/python/urllib2_file/