title: Updating a value in serializer after accessing .data in Django Rest Framework
body: <p>I have a serializer for my <code>Post</code> class which has a <code>image</code> and a <code>link</code> attribute.</p>
  
  <p><code>media</code> is an <code>FileField</code> and <code>link</code> is a <code>URLField</code> which is a url to somewhere else I share my post (in another website.)</p>
  
  <p>I want to:</p>
  
  <ol>
  <li><p>Submit my post data (text, and the image)</p></li>
  <li><p>Accessing the url of submitted file to use in sharing it in another place.</p></li>
  <li><p>Updating the <code>link</code> value after I found it.</p></li>
  </ol>
  
  <p>This is what I tried:</p>
  
  <pre><code>post = PostCreateSerializer(data=request.data, context={'request': request})
  post.is_valid(raise_excpetions=True)
  post.save()
  media_url = post.data.get('media')
  link = find_link_value(media_url)
  post.link = link
  post.save()
  </code></pre>
  
  <p>This raises an exception. says:</p>
  
  <pre><code> You cannot call `.save()` after accessing `serializer.data`.If you need to access data before committing to the database then inspect 'serializer.validated_data' instead.
  </code></pre>
  
  <p>The problem is when I use <code>post.validated_data.get('media')</code> instead of <code>.data</code>, it doesn't give me the url. It gives me an <code>InMemoryUploadedFile</code> object, that of course, doesn't have any path and url.</p>
  
  <p>I thought I could use <code>name</code> attribute of <code>InMemoryUploadedFile</code> object to find the url (the one that will be created after <code>.save()</code>), but when the name is duplicate, the real name of file in disk and url differs from it's original name (for example, <code>name.jpg</code> and <code>name_aQySbJu.jpg</code>) and I can't use it for my purpose.</p>
  
  <h2>Question</h2>
  
  <p>How can I have access to URL of that uploaded file, and also call <code>save()</code> after I updated my <code>post</code>?</p>