Support Topics Documentation Slack YouTube Blog

Backendless File Upload for .NET

Hi, I would like to upload a file to the BackEndless files section for my app with the Async version of the .NET api, like this, where ImageSource is a path to an image on the device (this is in Xamarin Forms). Is there a way I can specify the filename to be used on the server? I only see how this will upload with the existing filename. I probably want to generate a filename like a GUID or something, so I can’t run into problems with an already existing filename on the server.


BackendlessFile file;
// First upload the image for the event . . .
using (FileStream fs = new FileStream(ImageSource, FileMode.Open, FileAccess.Read))
using (UserDialogs.Instance.Loading(“Saving…”))
file = await Backendless.Files.UploadAsync(fs, “event_images”);

Hi @Aaron_Schaefer.
Alternatively, you can upload the file and then change its name.

Regards, Nikita.