This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal



Mar 1, 2012, 10:08 AM
178 Posts

File Upload control - How to specify to accept certain movie files?

  • Category: Other
  • Platform: All
  • Release: 8.5.3
  • Role: Developer
  • Tags: file upload,flv,movies
  • Replies: 7
 I wonder how to define that certain movie files are allowed only for uploading via the file upload control.
 
How to define you can read here: http://t.co/aOsb9ezc 
 
In my example I would like to allow: 
 
video/mp4,video/quicktime,video/x-flv,application/x-shockwave-flash,video/3gpp,video/3gpp2,audio/MP4A-LATM 
 
however testing while uploading an flv file causes the error:  Unaccepted Content Type: application/octet-stream
 
What am I doing wrong? 
Mar 1, 2012, 12:38 PM
129 Posts
Re: File Upload control - How to specify to accept certain movie files?
You might have to add the MIME types to the server httpd file, so that the server can correlate extension and file type.
 
Example for Office file types: 
http://dontpanic82.blogspot.com/2009/06/serving-correct-mime-types-for-office.html 
Mar 1, 2012, 2:46 PM
178 Posts
well its not about opening files, but for uploading...

Mar 1, 2012, 8:38 PM
170 Posts
Re: File Upload control - How to specify to accept certain movie files?
Perhaps you need to add these types to the file identifications beneath the web section in the name and adressbook?
I think you will get octet stream if the server don't recognize the upload. That is some kind of generic type. 
 
/Fredrik 
http://www.xpagedeveloper.com 
Mar 4, 2012, 4:49 PM
272 Posts
Re: File Upload control - How to specify to accept certain movie files?
Hi,
 
it is the browser who sends the mime type of the uploaded file to the server. If the browser is unable to identify the file (normally done via the file extension), the content type of the uploaded data is "application/octet-stream" by default.
 
The file upload control is just checking this content type of the uploaded form data; if a users changes the file extension, he would be able to upload a "not allowed" file. The restriction would not work anymore.
 
Hope this helps
Sven
 
Mar 5, 2012, 9:37 PM
178 Posts
Re: File Upload control - How to specify to accept certain movie files?
 I guess most major browsers (chrome, firefox, ie) do not know how to identify .flv files then..?
Mar 6, 2012, 6:42 AM
272 Posts
Re: File Upload control - How to specify to accept certain movie files?
If there is no handler for a .flv file installed (aka flash plugin), the file will not be identified.
 
Browsers are not consistent in their mime-types, so you will never catch all the possible combinations of types for any given file format. And the information your application will receive is useless. If someone wants to upload an .exe-file he could change the extension to .avi and would be able to do so.
 
Sven
 
Mar 6, 2012, 12:06 PM
178 Posts
any swf file uploader to recommend?
 thanks Sven!
 
do you got any swf file uploader which you can recommend and/or code how to integrate it with xpages? 

This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal