[TYPO3] Path to files in TT_news

Erik Svendsen erik at linnearad.no
Thu Apr 10 14:33:22 CEST 2008


Hello Stephen,

> Thanks.
> 
> I wanted that everyone would upload files to specific folders, but
> sometimes files have endings added like: _01 or _02. I guess while it
> copies the file to uploads? In my extension I tried to build the path
> to where the file was uploaded, this works as long as the file has not
> had this number extension added by TYPO3.

It's added beacuse there is already a file in media or pics with the same 
name. The filename with ending will be saved in the correct field in the 
database (not the orginal filename)

And you don't need any extension, this is more and less only Typoscript. 
But you need to read TSref.  

> 
> Should I just uploads/pics/ for images and uploads/media/ for files
> instead? If someone uploads a file to a specific folder and adds it as
> a file to piece of content would the file that they uploaded get link
> to? Or a file with the same name that TYPO3 copies to pics or media
> folders?
> 

I suppose users are allowed to upload to subfolders in the fileadmin folder. 
If they are and pick the file from this folder (with the element browser), 
the file is copied to the pics or media folder when added to a content element. 
For some extensions the file is copied or uploaded to a specific folder created 
when installing the extensions. If the user uploads the image/file direct 
from own computer, its only saved in uploads.

Every file, without exeption would be linked if the configuration is correct. 
TYPO3 si handling it without any need to do anything. Problems can occur 
when making own extensions, but then the reasons is not enough knowlegde 
of how TYPO3 works.

If you don't want copies or files in upload folders you need to use the Dam 
extension nad some extensions to brigde between Dam and content element. 
You also need to turn of the possibility to make direct uploads, only uploads 
through Dam or the Element browser should be allowed. But if you are going 
to make an extension to list files this may be more comlicated.


WBR,
Erik Svendsen
www.linnearad.no



> -----Ursprüngliche Nachricht-----
>> Von: typo3-english-bounces at lists.netfielders.de
>> [mailto:typo3-english-bounces at lists.netfielders.de] Im Auftrag von
>> Erik
>> Svendsen
>> Gesendet: Donnerstag, 10. April 2008 13:41
>> An: typo3-english at lists.netfielders.de
>> Betreff: Re: [TYPO3] Path to files in TT_news
>> Hello Stephen,
>> 
>> The images in the image field has standard upload folder
>> uploads/pics/
>> 
>> If you hover over the thumbnail, it will show.
>> 
>> The files in files field has standard upload folder in uploads/media/
>> 
>> The imagename are saved in the database, and the path to the folder
>> is given
>> 
>> in the extensions TS Setup. You can change the path given in the TS
>> Setup if you want.
>> 
>> These settings are standard TYPO3 settings.
>> 
>> If you are using Dam together with for instance dam_ttnews this is
>> not the case.
>> 
>> If you want to make an extension who list files attached to all
>> articles you the databse field an the path information in TS Setup is
>> what you need. You don't even need to make an extension, it can med
>> made with pure Typoscript.
>> 
>> Else, every extension with a manual (some hasn't), has the manual
>> accessible
>> 
>> as a OpenOffice document in the Extension manager.
>> 
>> Most of what you are asking about, are explained in different
>> documentation.
>> 
>> TYPO3 is a system that require reading of documentation. Even if some
>> of them are a bit complex.
>> 
>> WBR,
>> Erik Svendsen
>> www.linnearad.no
>> All I see in the backend by the file or image fields is the name of
>> the file, an icon for it's file type, and a prieview (in the case of
>> images).
>> 
>> In the database, all you see is the filename and file extension. If I
>> make an extension that lists files attached to articles, how can I
>> find out where it is exactly from just the file name/extension? Or
>> must everything then be uploaded in a particular folder? So that I
>> can hardcode the files path in the extension?
>> 
>> -----Ursprüngliche Nachricht-----
>> 
>> Von: typo3-english-bounces at lists.netfielders.de
>> [mailto:typo3-english-bounces at lists.netfielders.de] Im Auftrag von
>> Erik
>> Svendsen
>> Gesendet: Donnerstag, 10. April 2008 00:21
>> An: typo3-english at lists.netfielders.de
>> Betreff: Re: [TYPO3] Path to files in TT_news
>> Hello Stephen,
>> Is there away to find out the path tot he files in tt_news articles?
>> Only the file name seems to be saved.
>> 
>> Also how does one build a link to the file? Are there any pre-made
>> functions for that?
>> 
>> I suppose you are thinking about for instance pdf-files. It may
>> depends of you are using DAM with dam_ttnews or not and how you are
>> uploading it. But standard is uploads/media. But you should see the
>> link in the frontend. If you don't there are something wrong.
>> 
>> You find the configuration in tt_news/pi/static/ts_new/setup.txt. I
>> suppose you also need to see in the php-files to get all details.
>> 
>> But I haven't had any close look yet.
>> 
>> WBR,
>> Erik Svendsen
>> www.linnearad.no
>> _______________________________________________
>> TYPO3-english mailing list
>> TYPO3-english at lists.netfielders.de
>> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>> _______________________________________________
>> TYPO3-english mailing list
>> TYPO3-english at lists.netfielders.de
>> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english




More information about the TYPO3-english mailing list