What I’m trying to do is to use Unreal’s save system to make a save file, and then get this save file and upload it to my server (PlayFab).
So far I have:
1- a SaveGameObject ready, which can be saved to a named slot.
2- an upload request working, which asks a FileName as a string
But I’m lost in how to link the save file I created to the FileName requested to the upload. Such a small simple thing, but I’m lost here.
I suppose FileName should be the adress in the user’s device where the file is, such as C:\GameName\Folder\SaveGameFile.sav
But how can I retrieve this adress to pass it over?
For reference here is upload function, with FileName in bold:
void UMyGameInstance::RequestURL(FString URL, FString FileName)
{
FHttpRequestPtr Request = FHttpModule::Get().CreateRequest();
Request->OnProcessRequestComplete().BindUObject(this, &UMyGameInstance::OnResponseReceived);
Request->SetVerb(“PUT”);
Request->SetURL(URL);
Request->SetContentAsStreamedFile(FileName);
Request->ProcessRequest();
}