Anna
Anna

Reputation: 1

How to Upload a Video to Back4App

so I‘m working with flutter and Back4App and I want to Upload Videos from the Gallery or from the Camera to Back4App. I couldn‘t find a tutorial to it online so I‘m kinda stuck. I found this one for images: https://www.back4app.com/docs/flutter/parse-sdk/flutter-save-file Can sombody maybe provide an example for videos? Thank you!

Also I can already choose videos from the Gallery or take Videos with the camera but after that my App crashes and the Video wont show in my app.

Upvotes: 0

Views: 136

Answers (1)

rrttrr
rrttrr

Reputation: 1846

Try this,

ParseFileBase? parseFile;
parseFile = ParseFile(File(pickedVideoFile!.path));
await parseFile.save();
final videoGallery = ParseObject('VideoGallery')..set('file', parseFile);
await videoGallery.save();

Upvotes: 0

Related Questions