anchor.diff:  failed_gui_upload_test(Config) ->
       #env{p1 = P1, user1 = User1, file1 = File1, file2 = File2} =
           gen_test_env(Config),
  -
  -    {ok, #file_attr{guid = Guid}} = lfm_proxy:stat(P1, User1, {path, <<"/space4">>}),
  +    SessId = fun(Worker) -> ?config({session_id, {User1, ?GET_DOMAIN(Worker)}}, Config) end,
  +
  +    {ok, #file_attr{guid = DirGuid}} = lfm_proxy:stat(P1, User1, {path, <<"/space4">>}),
   
       FileSize = 500*1024*1024, % 500 MB
   
       ProviderId = initializer:domain_to_provider_id(?GET_DOMAIN(P1)),
       % Upload File1 500MB to space4
  -    do_multipart(P1, User1, 100, 1048576, 5, Guid, File1),
  +    {ok, File1Guid} = lfm_proxy:create(P1, SessId(P1), DirGuid, File1, 8#777),
  +    upload_file(P1, ?USER(User1, SessId(P1)), 100, 1048576, 5, File1Guid),
   
       {ok, FileHandle} = lfm_proxy:open(P1, User1, f(<<"space4">>, File1), rdwr),
       ok = lfm_proxy:fsync(P1, FileHandle),
       ?assertMatch(FileSize, current_size(P1, <<"space_id4">>)),
   
       % Upload File2 800MB to space4
  -    do_multipart(P1, User1, 160, 1048576, 5, Guid, File2),
  +    {ok, File2Guid} = lfm_proxy:create(P1, SessId(P1), DirGuid, File2, 8#777),
  +    upload_file(P1, ?USER(User1, SessId(P1)), 160, 1048576, 5, File2Guid),
       ok = lfm_proxy:fsync(P1, User1, f(<<"space4">>, File2), ProviderId),
   
       StorageFilePath1 = storage_file_path(P1, <<"space_id4">>, File2),
  
positive.code: available_size(Worker, SpaceId) ->
      rpc:call(Worker, space_quota, available_size, [SpaceId]).
  
  do_multipart(Worker, SessionId, PartsNumber, PartSize, ChunksNumber, ParentGuid, FileName) ->
      ChunkSize = PartsNumber*PartSize,
      ParamsProp = [{<<"resumableIdentifier">>, <<"id">>}, {<<"parentId">>, ParentGuid},
          {<<"resumableFilename">>, FileName}, {<<"resumableChunkSize">>, integer_to_binary(ChunkSize)}],
  
      utils:pforeach(fun(Chunk) ->
          rpc:call(Worker, page_file_upload_deprecated, multipart, [#{size => PartSize, left => PartsNumber}, SessionId,
              [{<<"resumableChunkNumber">>, integer_to_binary(Chunk)} | ParamsProp]])
      end, lists:seq(1,ChunksNumber)).
  
  open_storage_file(Worker, FilePath) ->
  
negative.code: quota_updated_on_gui_upload(Config) ->
      #env{p1 = P1, p2 = P2, file1 = File1, file2 = File2} =
          gen_test_env(Config),
      UserId = <<"user1">>,
      SessId = fun(Worker) -> ?config({session_id, {UserId, ?GET_DOMAIN(Worker)}}, Config) end,
  
      {ok, #file_attr{guid = DirGuid}} = lfm_proxy:stat(P1, SessId(P1), {path, <<"/space3">>}),
      {ok, FileGuid} = lfm_proxy:create(P1, SessId(P1), DirGuid, File1, 8#777),
  
      upload_file(P1, ?USER(UserId, SessId(P1)), 1, 20, 1, FileGuid),
  
      {ok, _} = lfm_proxy:stat(P1, SessId(P1), f(<<"space3">>, File1)),
      {ok, FileHandle} = lfm_proxy:open(P1, SessId(P1), f(<<"space3">>, File1), rdwr),
  