from SaveGameObject to FileName

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();
}

you have a slot name for save object which it’s representing file name MySlotName.sav , and default directory for SaveGame in the folder FPaths:ProjectSaveDir .

try to combine it for “FileName”

1 Like

Thank you!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.