You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
: Instance of the model before it has been saved. You may not have a
primary key at this point.
uuid
: UUID version 4 that supports multiple type specifiers. The UUID will
be the same should you use it twice in the same string, but
different on each invocation of the upload_to callable.
The type specifiers allow you to format the UUID in different ways,
e.g. `{uuid:x}` will give you a with a hexadecimal UUID.
The supported type specifiers are:
`s`
: String representation of a UUID including dashes.
`i`
: Integer representation of a UUID. Like to `UUID.int`.
`x`
: Hexadecimal (Base16) representation of a UUID. Like to
`UUID.hex`.
`X`
: Upper case hexadecimal representation of a UUID. Like to
`UUID.hex`.
`base32`
: Base32 representation of a UUID without padding.
`base64`
: Base64 representation of a UUID without padding.
:::: warning
::: title
Warning
:::
Not all file systems support Base64 file names.
::::
All type specifiers also support precisions to cut the string, e.g.
`{{uuid:.2base32}}` would only return the first 2 characters of a
Base32 encoded UUID.
Type specifiers
You can also use a special slug type specifier, that slugifies strings.