Parse-SDK-Flutter icon indicating copy to clipboard operation
Parse-SDK-Flutter copied to clipboard

Problem of setting the filename

Open Gustavo-alves-fernandes opened this issue 3 years ago • 1 comments

Problem of setting the filename and url, I have to instance the ParseFile and by null in the first parameter file in this part it gives an error in version 2.1.0 it didn't have this problem, how do I put the URL in the ParseFile objective in this new version of the package

Future<List<ParseFile>> saveImages(List images) async { final parseImages = <ParseFile>[];

try {
  for (final image in images) {
    if (image is File) {
      final parseFile = ParseFile(image, name: path.basename(image.path));
      final response = await parseFile.save();
      if (!response.success) {
        return Future.error(
            ParseErrors.getDescription(response.error.code));
      }
      parseImages.add(parseFile);
    } **else {
      final parseFile = ParseFile(null);  <==================
      parseFile.name = path.basename(image.path);   <=================
      parseFile.url = image;
      parseImages.add(parseFile);**
    }
  }

Gustavo-alves-fernandes avatar Aug 05 '21 16:08 Gustavo-alves-fernandes

What error do you get? Is there a message?

LMBernardo avatar Oct 20 '21 19:10 LMBernardo

It was tested, there is no problem, if you declare that the problem is not solved, the issue will be opened again

mbfakourii avatar Dec 19 '22 06:12 mbfakourii