You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to upload an image picked using the dart image_picker package to Supabase storage. I don't see any error but there is no upload happening.
The link to the file picked by the image_picker package is in this format - /Users/test/Library/Developer/CoreSimulator/Devices/BCEC2CDE-0B63-4F09-B101-239E96AD7C2D/data/Containers/Data/Application/8748B187-56FF-4553-B8E3-2EB4218F3AF9/tmp/image_picker_01E551D2-7C5A-406E-98A3-5EDD9E19C1C9-17833-000002F4624B7ACF.jpg
I have declared a PickedFile variable like below and I am storing the above file path to the pickedfile variable
PickedFile? imageURI;
Here is my supabase dart upload code -
class SupabaseConfig {
SupabaseClient initialize() {
const SUPABASE_URL = 'supabase-url';
const SUPABASE_KEY =
'supabase-key';
final supabaseClient = SupabaseClient(SUPABASE_URL, SUPABASE_KEY);
return supabaseClient;
}
}
SupabaseConfig supabaseClient = new SupabaseConfig();
final client = supabaseClient.initialize();
final file = File(imageURI?.path as String);
final storageResponse = await client.storage
.from('avatars')
.upload('image.jpg', file);
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am trying to upload an image picked using the dart image_picker package to Supabase storage. I don't see any error but there is no upload happening.
The link to the file picked by the image_picker package is in this format - /Users/test/Library/Developer/CoreSimulator/Devices/BCEC2CDE-0B63-4F09-B101-239E96AD7C2D/data/Containers/Data/Application/8748B187-56FF-4553-B8E3-2EB4218F3AF9/tmp/image_picker_01E551D2-7C5A-406E-98A3-5EDD9E19C1C9-17833-000002F4624B7ACF.jpg
I have declared a PickedFile variable like below and I am storing the above file path to the pickedfile variable
PickedFile? imageURI;
Here is my supabase dart upload code -
Beta Was this translation helpful? Give feedback.
All reactions