Setting file directory or URL when uploading?
Permalink
Hello,
I'm looking at bringing some sites into C5 that are mostly flash framed with a simple html wrapper around them plus 3-4 html pages (about, TOS, privacy, etc.).
C5 seems like a perfect fit as far as simple editing of the text-heavy html stuff, and even the flash doesn't look too rough, but I'm not seeing an easy way to manage the flash assets. A few times a year we'll have new flash delivered to us and it will expect to find some assets in a particular directory. I can have the flash creators specify that directory, but for the life of me I see no way in the C5 file manager to upload files to a specific directory/URL.
What am I missing? I could revert to ftp or something, but that would sort of defeat the purpose of using a CMS in this case.
Any pointers appreciated.
Thanks!
I'm looking at bringing some sites into C5 that are mostly flash framed with a simple html wrapper around them plus 3-4 html pages (about, TOS, privacy, etc.).
C5 seems like a perfect fit as far as simple editing of the text-heavy html stuff, and even the flash doesn't look too rough, but I'm not seeing an easy way to manage the flash assets. A few times a year we'll have new flash delivered to us and it will expect to find some assets in a particular directory. I can have the flash creators specify that directory, but for the life of me I see no way in the C5 file manager to upload files to a specific directory/URL.
What am I missing? I could revert to ftp or something, but that would sort of defeat the purpose of using a CMS in this case.
Any pointers appreciated.
Thanks!
Neither... The flash app itself needs to load up files - perhaps an XML file, some jpgs, some .flv videos. When the developer creates the flash app, values for the location(s) of the files are hardcoded.
So the page loads, the flash loads, then the flash goes looking for stuff itself, ie:
/flash/img/001.jpg
/flash/img/002.jpg
/flash/video/001.flv
and so on...
I've also found some flash apps have issues with relative paths as well - if they are loaded out of some random directory nested 3 or 4 deep, they sometimes have issues finding any files they need to load.
So I'm looking for an end-user friendly way to upload the assets that the flash app requires...
So the page loads, the flash loads, then the flash goes looking for stuff itself, ie:
/flash/img/001.jpg
/flash/img/002.jpg
/flash/video/001.flv
and so on...
I've also found some flash apps have issues with relative paths as well - if they are loaded out of some random directory nested 3 or 4 deep, they sometimes have issues finding any files they need to load.
So I'm looking for an end-user friendly way to upload the assets that the flash app requires...
Ok, well I'm thinking while I type here, but maybe this could be done using a custom Helper. For instance, let's say you have a Flash app called myFlashApp. You create a FileSet called myFlashApp and ensure that all assets are added to this FileSet. When your Flash app loads, it passes its name to the Helper, which goes and gets the full list of files contained within that FileSet and passes them back as an array looking like:
Make sense? So when your app needs to load a jpg, it uses the variable myFlashApp['filename.ext'], which outputs the full concrete5 filename.
Would a method like that work for you?
Jon
myFlashApp (array) { [xmlFile.xml] => '/1234/5678/9012/xmlFile.xml' [img001.jpg] => '/1234/5678/9012/img001.jpg' }
Make sense? So when your app needs to load a jpg, it uses the variable myFlashApp['filename.ext'], which outputs the full concrete5 filename.
Would a method like that work for you?
Jon
I don't think that would quite do it. I was mainly looking at whether without hacking anything around there was any pre-existing option in C5 to basically upload an asset to a predefined URL. But it pretty much looks like there's no control over how the directory hashing for uploaded files will be performed.
If the whole site was being built by one group of people, then we could probably make a module that handled loading the flash app and it could deal with dynamically building an xml file for the flash app that would point it to the proper files. But we simply don't have that kind of cooperation.
I'm going to dig around a bit - I know Joomla and Drupal can do this, but they are just too bulky for this. Perhaps I can find a very tiny cms for this.
Thanks!
If the whole site was being built by one group of people, then we could probably make a module that handled loading the flash app and it could deal with dynamically building an xml file for the flash app that would point it to the proper files. But we simply don't have that kind of cooperation.
I'm going to dig around a bit - I know Joomla and Drupal can do this, but they are just too bulky for this. Perhaps I can find a very tiny cms for this.
Thanks!
Hi i'm just wondering if you ever figured this out?
thanks!
thanks!
Nope, just ended up keeping the assets outside of the media manager. If they want to change them, they have to break out ftp.
If it's the latter, you could ask your developers to upload the Flash files to your files/incoming directory, then you will be able to import them directly into the FileManager from there.
If it's the former, I'm not sure that will be possible, as C5 doesn't put files into a single folder as this can cause issues with large amounts of files. It splits the files up into quite a complex directory structure. I suppose you could always use a custom block to upload or copy certain files into a specific directory. i would need to understand your needs better to advise...
Jon