What is the proper way to handle videos in SwiftData ?

I'm creating an application with swiftui which gets images and videos from the Photos picker then store them with swiftData for later use.

I save both images and videos as data with  @Attribute(.externalStorage).

But it just seems wrong to me to store the videos that way, they can be several gigabytes in size . What is the correct way to handle something like this ? Is it to store the url and then each time the user wants to see a video save a temporary video ?. If that's the case can anyone show me how this should be done?

Any comments appreciated

Guillermo

What is the proper way to handle videos in SwiftData ?
 
 
Q