SDL Tridion how to publish pdf file in Tridion to a specific folder on the web site - tridion

Is there a way to publish pdf or any other binary files to a specific folders on the website, similar to file system structure? Part of my site is used for document repository and I need content manager an ability to simply upload/deploy documents

You can publish PDFs to a folder (or folders). You can then reference that PDF on webpages. You can link to this PDF as a component similarly to how you link to other webpages as components.

Related

Public facing webfolder Google malware warning

OS: Windows
Programming: C#, asp.net
I have a website that has a fileupload control and all the user uploaded files are stored in a folder on the server. This folder is NOT indexable by search engines and not viewable as a url (or file list view). From time to time I get a message from google webmaster tools that this folder has malware. As this folder is for uploading files, I have little control on its contents.
I wonder, there are so many websites out there which allow users to upload files.
What are the best practices.
Any tips to just avoid that Google keeps blacklisting this folder from time to time?
Thanks a lot in advance,
Prasad.
Are the files then referenced in links on your webpage or sitemap.xml? Google will find them afterwards, when indexing pages where the files are referenced.
Did you find the malware files? What file extensions had they? Can you restrict the users to upload only certain (possibly safe) file types?

How to reference a file (e.g. testaudio.mp3) from another file (e.g. index.html) in Alfresco

I have a mp3 file in a folder called "audio" in Alfresco. I would like to have a link that points to that file in my index.html file which resides in another folder.
For example: <a href="pathToTheFile>test song 1</a>
How would I reference that file? I tried with href="/share/proxy/alfresco/api/node/content/workspace/SpacesStore/xxx-xxx-xxxxx/testMP3.mp3" and it does not work. Or is it even possible with Alfresco? I am using the web interface.
My apologies for not making myself clear. I am using Alfresco Explorer Community Edition for management, and the website I'm working on is based on Spring MVC and pulls content from index.html files in Alfresco.
Currently I need to use <embed> tags to include a mp3 file to index.html, and the mp3 file is also stored within the Alfresco repository but in a different folder.
How would I reference the mp3 file from the index.html file? The referencing has to work when the index.html is deployed to the client website, and currently the client website is referencing files in Alfresco in the following manner: <img src=/asset/xxxxxx-xx-xxx/test.png>(There is no asset folder in the Alfresco repository, and somehow that works...). But this does not work for my mp3 file...
To access alfresco content using the RESTful api, you should be querying this webscript: /alfresco/d/<d|a>/<workspace>/<store>/<nodeId>/<filename>
where :
d and a refer to direct / attached mode
<workspace>, <store> and <nodeId> reference your content nodeRef
<filename> a file name of your choice
So your URL should look something like this http://<host>:<port>/alfresco/d/d/workspace/SpacesStore/8444ad61-4734-40e3-b2d4-b8b1c81347fd/test.mp3
Note : Depending on the permission set on your node, you might need to attach an alf_ticket to the URL for an authenticated alfresco user. Please check this for further insights.

How to select location for Asp.net Website project?

Creating a new website allows you to choose the path of the website files. However, the project file itself is created under the Projects folder. How can I create it somewhere else? I would expect some field for that in the dialog, but can't find it.
(This is not a web-application.)
At least in VS 2013, there is no project file associated with web sites. There is only the .SLN file. The .SLN file is merely a simple container for all of the different websites and projects that you would like opened simultaneously in your Solution Explorer, so the location of the .SLN file on disk is not really important.
Still, if you would like to control its location, you cannot do so through the New Website dialog. You'll have to manually move the .SLN file after you've already created the website. And in doing so, you would also have to open up the .SLN in a text editor and manually adjust all the relative paths to point to your website location.

Web Setup project not including some content files from ASP.NET MVC project

I am making a WEB SETUP for my ASP.NET application. Below is my folder structure for content folder.
I have added a WEB SETUP project and have included the 'Primary output from Web' and 'Content files from Web'.
But when i right click on the 'Content files from Web' and select the 'Output' option I see the following
only my .svg font is added, the rest 4 files (.eot, .ttf, .woff and .otf) are not added. Even when I run the installer and after the setup is complete I still do not see these 4 files in the Content/font-awesome/font folder.
What should I do to add these to the installer as well ?
Some font related files under your Content folder are probably not specified as "Content" files. You have to make Visual Studio understand that they are Content files. Content files are eventually copied to the compiled output directory when you execute your setup.exe file.
Just select your intended file(s) (using Ctrl-click if there are multiple files), right click choose Properties and from the Properties window, in front of "Build Action" choose "Content" option.
Now when you will Build and run your Setup.exe file, these files would be copied to the output directory.

Source control strategy for specific folders within CMS-generated site

I have an ASP.NET website where most of the pages are generated and published via a CMS system. This includes static HTML, CSS, ASPX, ASP, images, etc.
However, we have some user controls and pages that are managed by a separate dev team. These files live under the same web root but are not managed in the CMS. These files are limited to a few files and folders under the web root:
/bin
/user-controls
/custom-aspx
/web.config
(everything else under "/" is CMS-generated)
We don't want to check in all the CMS-generated items into source control (TFS in our case), because those files are constantly changing and versioning is managed within the CMS.
How should we handle source control for the directories listed above? Should we just check those in separately?
I see 3 options:
Checkout your version controlled file tree to root and add an ignore parameter for all CMS generated files (assuming they have a set of extensions that make this feasible).
Checkout each of the directories (/bin, /user-control, ...) separately to sub-directories of root, and make sure that no CMS generated files are written to these directories.
Checkout your version controlled file tree to root and just don't run svn add on any of the CMS generated media.

Resources