5

While doing a migration of tridion 5.2 to Tridion 2011 SP1 HR1, we noticed that there isn't a upload folder in the Tridion 2011 content manager directory.

The upload folder of Tridion 5.2 used to contain all files that where uploaded as a multimedia component, even before they where stored in Tridion.

Since our image crop-tool used this directory, is there a way of making this folder available in Tridion 2011?

FuZZbaLL
  • 181
  • 1
  • 7

2 Answers2

5

The upload directory is still used, but for security reasons it was moved outside of the web application (C:\Temp by default I believe).

You can configure it, though -- it's the Tridion.UploadDirectory element in System.config.

Peter Kjaer
  • 4,316
  • 13
  • 23
  • Thanks, this is indeed where the uploaded files are stored. Unfortunatly the filenames are altered by tridion 2011 as well, therefore i dont know which filetype it is. – FuZZbaLL Mar 06 '13 at 09:01
  • True -- as part of the same security fix, it is no longer possible to predict the filename either. So you might need to redesign your crop tool. Could you elaborate on how the tool works? When is it run, what data does it need, and does it do all of the files at once? – Peter Kjaer Mar 07 '13 at 09:21
  • This application is started by a link above a component field. It then uses the most recent uploaded file, because the component isn't saved jet. This file can then be edited in a custom editor – FuZZbaLL Mar 11 '13 at 15:18
  • If it's a web application, you can use Web.UI.Core.Utils.GetUserUploadFileName (from Tridion.Web.CMUtils.dll) to get the full name based on the nameOnServer property returned from the upload action. That property is available through $display.getItem().getUploadedMultimediaFilename(). Please make sure that you never return the resulting full name to the client, though. – Peter Kjaer Mar 18 '13 at 09:38
1

To find the MIME type based on the data of the file see the following post:

Using .NET, how can you find the mime type of a file based on the file signature not the extension

But depending on what you want to do with the file before it is created within the repository there might be much more elegant solutions, e.g. the event system.

Community
  • 1
  • 1
Arjen Stobbe
  • 1,684
  • 9
  • 15