Andrey,
I also faced this problem, but fortunately for me the media files were not updated from the UI (internal rules do not allow to upload such big files from ui web interface) but from the filesystem. So the only way I found is to use C API call in a lotusscript agent.
This agent will look at $File fields, extract them on the filesystem and reattach it using C Api call from lotusscript. Not nice and probably not what you're looking for but didn't find any other way to do it... :-((
In the declaration of the lotusscript agent (on a windows plateform) :
Const LIB_W32 = "nnotes" ' Windows/32
Declare Function W32_NSFNoteAttachFile Lib LIB_W32 Alias "NSFNoteAttachFile" (ByVal h As Long, ByVal item_name As LMBCS String, ByVal item_name_length As Integer, ByVal file_name As LMBCS String, ByVal orig_path_name As LMBCS String, ByVal encoding_type As Integer) As Integer
Declare Function W32_NSFNoteUpdate Lib LIB_W32 Alias "NSFNoteUpdate" (ByVal note_handle As Long, ByVal update_flags As Integer) As Integer
Private Const COMPRESS_NONE = 0%
Dim hNT As Long
In the agent, loop through all the items of the document and if the field is called $File field, extract the field on the filesystem, remove the $File item and reattach the file using this (doc=the notes document , importFullPath=the full path to the file extracted on disk(like c:\temp\myfile.avi) and filename the name of the file (myfile.avi)) :
hNT = doc.Handle
'Upload the file without compression
Call W32_NSFNoteAttachFile (hNT, "$File", Len("$File"), importFullPath, filename, COMPRESS_NONE)
'save the document
Call W32_NSFNoteUpdate(hNT, 0)
' remove the temporary document on disk
Kill importFullPath
Hope this helps anyway....
Renaud