Pregunta

I have a media centric website that requires us to upload large images, videos to the media library.

I have the default settings for the following settings in web.config.

  1. Media.MaxSizeInDatabase (20MB)
  2. httpRuntime maxRequestLength

I do not want to increase MaxSizeInDatabase limit on the production server for security reasons.

Also, Media.UploadAsFiles is set to false.

So, my question is - Is there a way to configure sitecore such that if the file being uploaded is less than 20MB, it gets stored in the database and the files larger than 20MB get stored on the file system?

¿Fue útil?

Solución

As Martijn says, there is nothing built in to automatically detect this, but if you know that the file is going to be large (or the upload fails due to the large size) then you can manually "force it" to save to file on a per upload basis.

You need to use the Advanced Upload option and select the "Upload as Files" option.

Upload Item Item to disk

EDIT: If you are able to use YouTube then consider the following modules with nicely/tightly integrated with Sitecore. There are a couple of others ways of achieving the same thing for different providers.

Otros consejos

No, not that I know of. At least not automatically. Uploaded files are either stored in the DB or on the filesystem, based on your setting. You might want to create an override upload method which could automatically handle this for you or use the manual checkbox in the Advanced Media Upload method as Jammykam says.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top