Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comment added FeedType to video file upload #223

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code_snippet/post/amity_post_video_creation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class AmityPostVideoCreation {
void uploadVideo(File uploadingVideo) {
//first, upload video
AmityCoreClient.newFileRepository()
.uploadVideo(uploadingVideo)
.uploadVideo(uploadingVideo , feedtype: AmityContentFeedType.POST)
.stream
.listen((AmityUploadResult<AmityVideo> amityResult) {
amityResult.when(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ class _CreatePostScreenState extends State<CreatePostScreen> {
for (final _file in files) {
final uploadCompleter = Completer();
AmityCoreClient.newFileRepository()
.uploadVideo(_file)
.uploadVideo(_file, feedtype: AmityContentFeedType.POST)
.stream
.listen((event) {
uploadInfoStream.add(UploadInfo(_file.path, event));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ class _UpdatePostScreenState extends State<UpdatePostScreen> {

if (files.isNotEmpty) {
for (var file in files) {
final video = await waitForVideoUploadComplete( AmityCoreClient.newFileRepository().uploadVideo(file).stream);
final video = await waitForVideoUploadComplete( AmityCoreClient.newFileRepository().uploadVideo(file , feedtype:AmityContentFeedType.POST).stream);
attachments.add(video);
}
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_social_sample_app
description: Demonstrates how to use the flutter_application_1 plugin.
version: 1.1.25+40
version: 1.1.26+41

environment:
sdk: ">=3.0.0 <4.0.0"
Expand Down
Loading