Top "Filefield" questions

Save base64 image in django file field

I have following input "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAA7YAAAISCAIAAAB3YsSDAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAA5JxJREFUeNrsnQl4FEX6xqcJJEAS7…

python django image filefield
Django REST Framework and FileField absolute url

I've defined a simple Django app that includes the following model: class Project(models.Model): name = models.CharField(max_length=200) …

python django url filefield
How to assign a local file to the FileField in Django?

I was trying to assign a file from my disk to the FileField, but I have this error: AttributeError: 'str' …

python django filefield
What is the clean way to unittest FileField in django?

I have a model with a FileField. I want to unittest it. django test framework has great ways to manage …

python django filefield django-unittest
Get absolute file path of FileField of a model instance in Django

I have a page where people can upload files to my server. I want to do something with the file …

django filepath absolute-path filefield
how to download a filefield file in django view

I have filefield in my django model: file=models.FileField(verbose_name=u'附件',upload_to='attachment/%Y/%m/%d',…

django download filefield
How to upload a file in rails?

I'm new to rails. I want to know about file uploading process in rails. Can anyone please help me... Thanks, …

ruby-on-rails file file-upload filefield
Rails 4 add file_field for attachment upload to existing form and controller

I'm super new to rails. Been learning a few weeks now. Please excuse my idiocy. I cannot get my file …

ruby-on-rails ruby ruby-on-rails-4 filefield
Django model with FileField -- dynamic 'upload_to' argument

I am using the model with FileField to deal with file uploading. Now the files can be uploaded successfully. However, …

django django-models filefield
How to show download link for attached file in FileField in Django Admin?

I have FileField in my django model: file = models.FileField(upload_to=FOLDER_FILES_PATH) In Django admin section for …

django-admin filefield