UploadContent (Unreal Engine)
- Declaration
static void UploadContent(FString FilePath, const CavrnusUploadCompleteFunction& OnUploadComplete);
Delegates Options:
DECLARE_DYNAMIC_DELEGATE_OneParam(FCavrnusUploadCompleteFunction, const FCavrnusRemoteContent&, uploadedContent);
typedef TFunction<void(const FCavrnusRemoteContent&)> CavrnusUploadCompleteFunction;
- Description
Encrypts and uploads a file from your disk to your Cavrnus Server. From here it will be accessible for your clients to download (in encrypted form) via the FetchFileById(LINK) call.
At all points of the process the files are encrypted and are only provided to clients via a Stream. Note though, that if those clients had API access and were authenticated on your server then they could write that stream to their disk as an unencrypted file. This is unavoidable as your developers obviously need to process those streams and display them in Unity.
OnUploadComplete
returns an FCavrnusRemoteContent object representing the file you just uploaded. If you wish you can then fetch it, or post it’s Id as a string property so other users can also fetch it.
- Blueprint Sample
(IMAGE COMING SOON!)
- Code Sample
TBD_SAMPLE.h:
//Coming Soon!
TBD_SAMPLE.cpp:
//Coming Soon!