filefield Questions

4

Solved

I have a FileField in a model. For each instance of the model, I would like that the filename on the disk stays updated with the value of another field (let's call it label) of the model. At the m...
Misanthrope asked 26/8, 2014 at 21:18

1

I have a filefield componente in my application and I want to restrict it to only image files. I've found this question on stackoverflow: How to restrict file type using xtype filefield(extjs 4.1....
Faruq asked 21/3, 2014 at 9:18

1

I have this model: class UserProfile(models.Model): #.......... photo = models.ImageField(upload_to = get_upload_file_name, storage = OverwriteStorage(), blank = True, null = True, height_fie...
Trimerous asked 28/3, 2014 at 11:42

3

Solved

My extjs code like http://www.objis.com/formationextjs/lib/extjs-4.0.0/docs/api/Ext.form.field.File.html Ext.create('Ext.form.Panel', { title: 'Upload a Photo', width: 400, bodyPadding: 10, fr...
Horacehoracio asked 20/6, 2013 at 8:27

5

I have 2 simple models: class UploadImage(models.Model): Image = models.ImageField(upload_to="temp/") class RealImage(models.Model): Image = models.ImageField(upload_to="real/") And one form ...
Adsorbent asked 23/4, 2011 at 14:38

2

In the Django admin, wherever I have a FileField, there is a "currently" box on the edit page, with a hyperlink to the current file. However, this link is appended to the current page url, and ther...
Mizell asked 5/9, 2013 at 9:26

6

Background I'm doing fairly big file uploads on Django. File size is generally 10MB-100MB. I'm on Heroku and I've been hitting the request timeout of 30 seconds. The Beginning In order to get a...
Appling asked 15/3, 2012 at 23:16

1

Solved

I am using the model with FileField to deal with file uploading. Now the files can be uploaded successfully. However, there is one more small improvement I want to make, which is to create folder f...
Angelicaangelico asked 9/7, 2013 at 4:6

2

Solved

I feel a little stupid for having to ask this… But I can't seem find it documented anywhere. If I've got a Model with FileField, how can I stuff an uploaded FILE into that FileField? For example,...
Soupandfish asked 16/5, 2010 at 18:37

2

Solved

I'm using Django's Admin site to manage some data - but not building a webapp. I need the file upload field to store only the file name in the database. Right now I can get absolute paths like: /U...
Mayman asked 4/4, 2013 at 18:54

2

Solved

I am implementing an application with django, which has a model with a FileField: class Slideshow(models.Model): name = models.CharField(max_length=30,unique=True) thumbnail = models.FileField(m...
Warrington asked 7/1, 2010 at 22:1

2

Solved

how can I get the link of a FileField? I tried the url field, but it gives the file path: In [7]: myobject.myfilefield.path Out[7]: u'/home/xxxx/media/files/reference/1342188147.zip' In [8]: myob...
Retina asked 13/7, 2012 at 15:40

1

Solved

<div id="photo_attachment_container"> <%= f.file_field :photo %> </div> Currently this just looks like a button, how can I add some css and customise the look (e.g dimensions...
Wakashan asked 12/8, 2011 at 8:0

1

Solved

I would like to copy a file from my computer to another specified path. The file has to be chosen by the user with a file_field and the destination is already hard-coded. How can I do that ? Thank ...
Hairston asked 12/7, 2011 at 17:59

3

Solved

I'm trying to create my own field type for uploading images, it won't be used in the django admin panel. I imagine the syntax would probably look something like: photo = CustomImageField(upload_to...
Lang asked 27/1, 2011 at 10:25

1

Solved

I want to be able to upload a file and on each upload to override/replace the existing file with the newest version. from django.core.files.storage import FileSystemStorage fs = FileSystemStorage...
Ugh asked 23/11, 2010 at 7:55

© 2022 - 2024 — McMap. All rights reserved.