Is there a way to force sitecore users to upload media as file? - sitecore8

Just as the title says, I need a way to force users to only upload media as file. From what I've seen the only way to upload as file is to upload using the advanced upload options.

You can use Media.UploadAsFiles setting to force Sitecore to store all media items as files:
<!--
UPLOAD AS FILES
Controls whether Sitecore stores media as files or as database records by default.
This setting is ignored if the Media.DisableFileMedia setting is true.
Default: false
-->
<setting name="Media.UploadAsFiles" value="false"/>

Related

Django-CKEditor Image Upload File Types

I have successfully installed Django CKeditor with Uploader but I have one problem I cannot find information about. When I select Upload I get the standard Windows file browser but it is set to all files. How can I configure CKUploader to just show supported image file types?
Thanks.
You can restrict upload to image only by setting CKEDITOR_ALLOW_NONIMAGE_FILES = False in settings.py

Sitecore advanced upload option is missing from admin panel

I was trying to upload an image using Sitecore [Version 6.5] media library to my existing sitecore website. I see the Advance Upload Files option is completly missing. Later, I tried to install a default sitecore instance and I see the Advanced Upload option is there. But it is completely missing to the existing sitecore website.
Here, is the snapshot of my site where the Advanced upload option is completely missing:
And here is the snapshot of my default sitecore site where the Advanced upload option is there:
To fix this, I tried to change couple of configuration files. But still the same issue. The Advanced upload files option is completely missing. Did you face the same type of issue or if you know how to fix this issue, can you please share your thoughts. Or if I need to change any of the configuration files, then can you share your thoughts about that change of any of the configuration file?
Thanks
Upload files (Advanced) button is hidden in 2 cases:
Folder does not use Media Folder template. Just check your folders - maybe they use standard Folder template instead of Media Folder.
Upload.Classic setting is set to false. Open /sitecore/admin/showconfig.aspx and look for Upload.Classic value. When it's set to true, Sitecore uses flash upload instead.
If none of above is the case, maybe you have some custom code which hides Upload files (Advanced) button from you editors.

Restrict image upload size in sitecore

Is there a way to control image upload size in Sitecore?
is it possible to have a custom warning message on uploading a large file?
We are on Sitecore 8.1 update 3.
You can use setting:
<setting name="Media.MaxSizeInDatabase" value="500MB"/>

Sitecore - not publishing media library

We are using Sitecore 6.5 and have a multi-site Sitecore solution (with lots of library code we have inherited)
Publishing the Media Library by item from Staging to Production but we are not seeing the image on the web.
The images are in the web database and the path to the images in the web site is good.
Error we are getting when the file is requested (same in browser window address bar) is http://domainname/error?aspxerrorpath=/~/media/OSS/Images/WaterAndWildlife/myimage.jpg.
There is no media prefix in the web.config
Any idea?
....Looking into it now but site is going live tomorrow so help very appreciated! Help!!
We faced a similar problem when, in production, media files were not published which resulted in 404 errors.
Solution: The problem was that media files were not saved to the database because a file path was provided with the Sitecore media files while uploading.
So the images were saved on the file system instead of in the database. But based on our web.config configuration we were fetching images from the database.
If you are facing a similar issue, just download the media image, remove the file path, and save it. Then re-upload the same image, save and publish the image.
Hope your problem will be solved.
One question, are these staging and production environments separate code files? if they are, what is the setting in your web.config for the settigns UploadAsFiles? because if that's true it will store them on server and the images will be on staging but not on prod. But usually if this setting is true and the files are getting stored in file system, specially in CM/CD environment it should push the physical files on publish as well, but sometime there might be other issues going on like permission etc..... and the files cant get to the destination.
"<setting name="Media.UploadAsFiles" value="false">"

html5 video file process and could view in IE9

My questions:
1.I just uploaded a mp4 file in the sitecore backend, and when i use the html5 video tag to show it in the front end. how could i change the file type for Firefox? Firefox use the .webm format. but i think my mp4 file which uploaded could not convert to .webm file.
2.As sitecore use the .ashx extenstion name for the media, i add an extension name in the end of that ,which as below,
<source type="video/mp4; codecs=avc1.42E01E, mp4a.40.2" src="~/media/Files/Videos/sample video mp4.ashx?ext=.mp4"></source>
It works fine in IE7 and IE8, but it's still could not work in IE9.
how's i could change it as a real .mp4 file for IE9?
Any help, thanks
Regarding your 2nd question:
If you're working with a recent version of Sitecore and I'd recommend running the IIS AppPool in integrated mode and change the configuration of "Media.RequestExtension" to an empty value in the web.config (or your prefered include config file).
New Sitecore Web.config value:
<setting name="Media.RequestExtension" value="" />
Or as a "patch" in an include file:
<setting name="Media.RequestExtension" set:value="" />
This setting results in media links with the original filename, which in your case would be "~/media/Files/Videos/sample video mp4.mp4"