Ismael
(Shalanga)
July 6, 2009, 3:07pm
1
Hi, I couldn't find it… but is there a way to rename a file which will be asset?
The situation is: I have a common folder to store files which comes from admin modules.
So, i prefix them something like this: salaimprensa-2-Por-do-sol.jpg <module>-<id>-<file_name>.
Well, the only inconvenience is this: http://10.0.0.103/yi…ssets/a3e6bc34/ salaimprensa-3- Ebook_-Livro -_Pai_Rico_Pai_Pobre.pdf
qiang
(Qiang Xue)
July 6, 2009, 8:33pm
2
no existing way…but why you want to prefix it?
Ismael
(Shalanga)
July 6, 2009, 10:51pm
3
Just because they are stored in a different format.
/<model>-<id>-<file_name>.<extension>
I have stored in DB only <file_name>.<extension>. The other parts it's placed in the script.
When published() they are showed all parts:
/<model>-<id>- <file_name>.<extension>
And I only want the final user to see:
/<file_name>.<extension>
My situation needs this feature.
It would be nice the publish() method have a optional param called publish( $alternativeName=‘someName’ );
qiang
(Qiang Xue)
July 6, 2009, 11:29pm
4
I don't understand why you want to publish these files…It seems to me these files are something like attachments. You should use some script to send the files to end-users, instead of using asset publishing which is really not for this purpose.
Ismael
(Shalanga)
July 6, 2009, 11:55pm
5
Well, I did it already.
Maybe I’m confused the purpose of assets files.