mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-03 00:47:53 +00:00
get comfyui media downloads working
This commit is contained in:
1 parent
cf59c8e2fc
commit
bcea80c39b
2 files changed
+25
No files matched your search
@@ -1,4 +1,5 @@
|
||||
use crate::remote_file_manager::file_descriptor::FileDescriptor;
|
||||
|
||||
// TODO ASK BRANDON WHAT path should this be?
|
||||
const MEDIA_FILE_DIRECTORY: &str = "/media";
|
||||
|
||||
@@ -38,3 +39,21 @@ impl FileDescriptor for MediaVideoMp4Descriptor {
|
||||
true
|
||||
}
|
||||
}
|
||||
|
||||
pub struct UploadVideoMp4Descriptor;
|
||||
impl FileDescriptor for UploadVideoMp4Descriptor {
|
||||
fn remote_directory_path(&self) -> &str {
|
||||
MEDIA_FILE_DIRECTORY
|
||||
}
|
||||
fn get_suffix(&self)->String {
|
||||
"mp4".to_string()
|
||||
}
|
||||
|
||||
fn get_prefix(&self)->String {
|
||||
"upload".to_string()
|
||||
}
|
||||
|
||||
fn is_public(&self) -> bool {
|
||||
true
|
||||
}
|
||||
}
|
||||
+6
@@ -61,6 +61,12 @@ impl RemoteCloudBucketDetails {
|
||||
_ => panic!("Unknown suffix: {}",self.suffix)
|
||||
}
|
||||
},
|
||||
"upload" => {
|
||||
match self.suffix.as_str() {
|
||||
"mp4" => Box::new(media_descriptor::UploadVideoMp4Descriptor {}),
|
||||
_ => panic!("Unknown suffix: {}",self.suffix)
|
||||
}
|
||||
},
|
||||
_ => panic!("Unknown prefix: {}", self.prefix)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user