-
Notifications
You must be signed in to change notification settings - Fork 28
Description
Can we access your project?
- I give permission for members of the FlutterFlow team to access and test my project for the sole purpose of investigating this issue.
Current Behavior
Hello. I have 3 problems.
1- The blue loading line I've started seeing since February 3rd's update is back (was gone after you guys reverted the said update) since yesterday.
2- I can not upload any images to neither firestore nor local. Problem was gone after gone after you guys reverted the said update but came back again since yesterday.
3- My delete user uploaded image from storage custom action does not work anymore, again. Problem was gone after gone after you guys reverted the said update but came back again since yesterday.
Expected Behavior
Should correctly upload...
Should correctly delete....
They were 100% fine before update.
Steps to Reproduce
add image widget. set its action to upload/save media -> to firestore.
set image path to "from widget state -> uploaded file url (Tt image path)"
or
add image widget. set its action to upload/save media -> local upload.
set image image type "uploaded file"
set image path to "from widget state -> uploaded local file (bytes)"
for delete custom action: just added the code in the images and set up the action.
Reproducible from Blank
- The steps to reproduce above start from a blank project.
Bug Report Code (Required)
IT4khfHq2It2oflA7ZDTbe1v/SUWQmYlTL0zqNYbGA0oIYyuOpl/evXsSEpCYMu6TXNmJkSmmkwD0vzRuePuGu4FBy+bR6JqzrV+ShfwcFKte5OBDM6dOWglGfNXCEim4bbYsyRSIvZpSVo67F+Xety9TgTrN5D0ImdISq/LZO4=
Visual documentation

local upload action in an icon button

delete user uploaded image from storage custom action settings - 1

delete user uploaded image from storage custom action settings - 2

delete user uploaded image from storage custom action code - 1

delete user uploaded image from storage custom action code - 2

local upload action in a button. this is also not working.
code in the images, just in case you need it. (generated by ai, sorry if this seems dumb at any point...)
// Automatic FlutterFlow imports
import '/backend/backend.dart';
import '/flutter_flow/flutter_flow_theme.dart';
import '/flutter_flow/flutter_flow_util.dart';
import '/custom_code/actions/index.dart'; // Imports other custom actions
import '/flutter_flow/custom_functions.dart'; // Imports custom functions
import 'package:flutter/material.dart';
// Begin custom action code
// DO NOT REMOVE OR MODIFY THE CODE ABOVE!
import 'package:firebase_storage/firebase_storage.dart';
import 'package:cloud_firestore/cloud_firestore.dart';
Future deleteProfilePhoto(
DocumentReference userRef,
String? photoUrl,
) async {
final raw = (photoUrl ?? '').trim();
// Nothing to delete
if (raw.isEmpty) return;
// 1) Delete from Firebase Storage (supports: download URL, gs:// URL, or plain storage path)
try {
if (raw.startsWith('http') || raw.startsWith('gs://')) {
// Works for Firebase download URLs and gs:// URLs
final ref = FirebaseStorage.instance.refFromURL(raw);
await ref.delete();
} else {
// Treat as a Storage fullPath like: users/uid/uploads/xxx.jpg
await FirebaseStorage.instance.ref().child(raw).delete();
}
} catch (_) {
// Fallback for download URLs: extract "/o/" then decode it
final uri = Uri.tryParse(raw);
if (uri == null) rethrow;
final segments = uri.pathSegments;
final oIndex = segments.indexOf('o');
if (oIndex != -1 && oIndex + 1 < segments.length) {
final encodedPath = segments[oIndex + 1];
final fullPath = Uri.decodeComponent(encodedPath);
await FirebaseStorage.instance.ref().child(fullPath).delete();
} else {
rethrow;
}
}
// 2) Clear Firestore field
// Use empty string to avoid breaking non-nullable ImagePath setups in FlutterFlow.
await userRef.update({'photo_url': ''});
}
Environment
- FlutterFlow version: Desktop app, 6.5.2
- Platform: Windows Desktop App
- Browser name and version: Firefox, 147.0.2 (64bit)
- Operating system and version affected: Windows 10 Pro, 22H2Additional Information
Please help...
