title: Set filename in Base64FileField in django rest framework extra fields
body: <p>I'm creating a Rest API with Django Rest Framework, and in some call, I need upload one of different file types.</p>
  
  <p>For do this, I am using <a href="https://github.com/Hipo/drf-extra-fields" rel="nofollow noreferrer">drf-extra-fields</a> and I have this problem:</p>
  
  <p>When the client convert file to Base64, the filename change and lose the file extension, for suply this, I created in serializer, new CharField called "file_extension":</p>
  
  <pre><code>class MySerializer(serializers.ModelSerializer):
      # Some other fields...
      file = FileField(required=False)
      file_extension = serializers.CharField(required=False)
      class Meta:
          # model and fields...
  </code></pre>
  
  <p>I created my custom Base64FileField, and set some allowed types and my method for get file extension:</p>
  
  <pre><code>class FileField(Base64FileField):
      ALLOWED_TYPES = ['pdf', 'txt', 'xml']
  
      def get_file_extension(self, filename, decoded_file):
          # Not working because the filename not include extension.
          return filename.split('.')[-1]
  </code></pre>
  
  <p>For solve this, I thinked set filename in serializer with file extension (taked for the other field) before get_file_extension is called.</p>
  
  <p>Thanks you!</p>