#How to use onProgress !
15 messages · Page 1 of 1 (latest)
storage.createFile(
bucketId: 'bucketid',
fileId: ID.unique(),
file: InputFile.fromPath(path: filePath, filename: fileName),
onProgress: (UploadProgress progress) {
print(progress.toString() +"Progress");
},
);
don't use progress.toString(). access the fields individually
it's usually a bad idea to do toString() because objects may not serialize to string like you expect
my file is uploading but its not showing anything in console (removed .toString())
how big is the file?
1 to 10 mb
and some files around 500kb
onpress is called for every chunk uploaded. each chunk is 5MB
did you specify a field to print?
progress.progress
nothing is printing on console
and you're uploading a file bigger than 5MB?
@cloud veldt thats how i use it