Questions tagged [filefield]

299 questions
0
votes
1 answer

Why won't this file field not save on the node object?

With print_r I get: stdClass Object ( [field_car_image] => Array ( [0] => Array ( [filename] => HERMAN 096.jpg [filepath] => sites/default/files/HERMAN 096.jpg [filemime] =>…
rockstardev
  • 13,479
  • 39
  • 164
  • 296
0
votes
1 answer

Ruby on Rails - Keep selected images in form after error

I use simple_form for handling forms & CarrierWave gem for handling image upload in my application. Sometimes when submitting the form, CarrierWave gives some errors regarding images, such as: (Files looks like to be another format etc). After…
Rubioli
  • 685
  • 6
  • 34
0
votes
1 answer

Can't use ImageField in Django now. Any alternatives?

I have been working on a deep learning Django app that requires PIL installed. Now, I want to handle some images sent from an Android app. Imagefield seems to depend on Pillow. But both PIL and Pillow can't exist together. Can FileField be used for…
bittterbotter
  • 445
  • 6
  • 18
0
votes
1 answer

How to retrieve the image stored with entity and attach it to the form in Symfony2?

How to insert an image in an Symfony form file input (the image stored with entity)? I can upload and submit a file, but can't retrieve it on form (in Front I can...) I have a form with a FileType input named imageFile: $builder->add('imageFile',…
Kr1
  • 1,269
  • 2
  • 24
  • 56
0
votes
2 answers

drupal 7 how to use drupal_goto for file

I did some custom scripting in a custom module. After my scripting I would like to go to the file path of a file field. How can I achive this? I have the uri of the file to display it. I tried drupal_goto('$result') where $result is result of…
0
votes
1 answer

drupal 7 Rules and files

I have in my node the integer field "teller" and a file field called "bestand". I would like to increase the teller field when the url of file field bestand is clicked. Can I do this with rules? Pls some help
0
votes
1 answer

Saving file in Django doesn't work

I've created a form which should gets text,modelchoice and file. Everything works correctly instead of file saving. It doesn't returns any error but does not save any file. So this is my form: class PurchaseForm(forms.Form): text =…
Milano
  • 18,048
  • 37
  • 153
  • 353
0
votes
1 answer

Placing a filename in a filefield in extjs

In my store I have a field called CreditName. In my view I am trying to check if CreditName is not null and if it is not enter it into my filefield. I have added a listener to my filefield that will enter text into the filefield. What I am having…
Aaron
  • 4,380
  • 19
  • 85
  • 141
0
votes
1 answer

How replace an old image for another image in django admin?

I would like replace from django admin, one image for another and delete the old image. This is my models.py: class Video(models.Model): name = models.CharField(verbose_name=u"Nom", max_length=64) machine = models.ManyToManyField(Maquina,…
danivaro
  • 35
  • 5
0
votes
1 answer

django image resolution in FileField

I have a class class MyFiles(models.Model): my_file = models.FileField(upload_to=get_upload_filename) def __str__(self): return self.my_file.url In my view i have a query like: read_file = MyFiles.objects.all() In my template I…
gamer
  • 5,673
  • 13
  • 58
  • 91
0
votes
1 answer

Python Pillow: Make image progressive saving to model

I asked a relative question previously, regarding pillow. Python Pillow: Make image progressive before sending to 3rd party server Just to extend this, How can I achive the progressiveness into the image when I am uploading an image and storing it…
A.J.
  • 8,557
  • 11
  • 61
  • 89
0
votes
1 answer

Django - Replace file of a FileField with file from another FileField

I have two models both having FileField like so: class OriginalFile(models.Model): docfile = models.FileField(upload_to=file_path) class RevisedFile(models.Model): newfile = models.FileField(upload_to=revisedfile_path) originalfile =…
Rahul
  • 502
  • 7
  • 16
0
votes
1 answer

I get error MultiValueDictKeyError if I dont upload all 3 filefields in my django form

I have a form with about 10 fields 3 of which are filefields. When I create a new record, No problem. When I update all fields, No problem. When I update only the 3 file fields and none of the other fields, no problem. But If I leave one filefield…
Dunski
  • 653
  • 5
  • 14
0
votes
1 answer

Failed validate dynamic filefields in Yii?

Hi, I'm trying to validate active filefield fields that were created in Yii so dynamic. I build using a forech for this inputs, the question is that when trying to validate when the user selects an image, indicate whether the file you chose is above…
0
votes
1 answer

Where does Django store bound ModelForm's files.FileField UploadedFile instance?

I'm creating a ModelForm: # .. forms.py .. class myform(forms.ModelForm): img = forms.ImageField(required=True, label='Required photo') class Meta: model = mymodel fields = '__all__' # .. view.py .. def myview(request): .. if…
Pavel Daynyak
  • 1,714
  • 1
  • 11
  • 7