• Home
  • Django
  • How to get path, url from file object / filefield

How to get path, url from file object / filefield

linkaiyi
Follow

File attributes

file.path # absolute path of the file
file.name # relative path to media_root
file.url # url link of the file
file.size # file size in bytes
Object has 0 attachments

Was this article helpful?

This article is viewed 44 times!

Recent Viewed Articles

0 Comments

Leave a Comment

Support