Good to hear on the folder situation. So far I’ve only been loading pack files containing raw text but textures and audio assets are a minimum next step - and the more standard content possible the better!
So I’ve managed to make contact with amazon servers but am stumbling on the signing process. Any pointers on how to approach this in unreal (preferably in a cross platform manner but PC and iOS are the current minimum).
Here’s my code creating the request:
FDateTime date = FDateTime::UtcNow();
FString dateStr;
date.ExportTextItem(dateStr, date, nullptr, 0, nullptr);
const TCHAR* dayOfWeek[] = {
_T("Sun"),_T("Mon"), _T("Tue"),_T("Wed"), _T("Thu"), _T("Fri"),_T("Sat")
};
const TCHAR* monthOfYear[] = {
_T("Jan"),_T("Feb"), _T("Mar"),_T("Apr"), _T("Jun"), _T("Jul"),_T("Aug"), _T("Sep"), _T("Oct"), _T("Nov"), _T("Dec")
};
FString dateString = FString::Printf(_T("%s, %02d %s %d %02d:%02d:%02d GMT"), dayOfWeek[(int)date.GetDayOfWeek()], date.GetDay(), monthOfYear[date.GetMonth()-1], date.GetYear(), date.GetHour(), date.GetMinute(), date.GetSecond());
m_URequest = FHttpModule::Get().CreateRequest();
m_URequest->SetVerb("GET");
m_URequest->SetHeader("Date", dateString);
m_URequest->SetHeader("Content-Type", "application/octet-stream");
m_URequest->SetHeader("Authorization", FString::Printf(_T("AWS %s:%s"), AuthID, AuthKey));
m_URequest->SetURL(FString::Printf(_T("https://s3.amazonaws./%s/%s"), RootBucket, *rFile));
m_URequest->OnProcessRequestComplete().BindLambda([this](FHttpRequestPtr, FHttpResponsePtr, bool){OnCompletion();});
if (!m_URequest->ProcessRequest())
{
Errorf(_T("Failed to start HttpRequest"));
m_eStatus = eStatus_Error_NoService;
}
And the response is:
SignatureDoesNotMatch
The request signature we calculated does not match the signature you provided. Check your key and signing method.