on ‎2018 Oct 22 2:08 PM
Hi Expert, I am getting error "Selected file type is invalid".After changed both file "seFileValidationService.js" I have added "mp4" and "seFileMimeTypeService.js" and magic number "667479706D703432" .I am uploading also mp4 file type. Is there something need to change somewhere or i am doing somewhere wrong also.Please suggest to me. It would be much appreciate .
BR, Omkar
Request clarification before answering.
I'm going to share my solution using SAP Commerce 1905
1) Create an extension from ysmarteditmodule you can find this here https://help.sap.com/viewer/86dd1373053a4c2da8f9885cc9fbe55d/1905/en-US/6d55d5fba206425b9acecda9f231...
2) Once you followed all the steps, get seFileMimeTypeService.js and seFileValidationService.js from cmssmartedit OOTB extension.
3) seFileMimeTypeService.js
angular.module('seFileMimeTypeServiceModule', []) .constant('seFileMimeTypeServiceConstants', {VALID_IMAGE_MIME_TYPE_CODES: ['FFD8FFDB', 'FFD8FFE0', 'FFD8FFE1', '474946383761', '474946383961', '424D', '49492A00', '4D4D002A', '89504E470D0A1A0A', '33677035', '0000001866747970','0000002066747970'] })4) seFileValidationService.js
.constant('seFileValidationServiceConstants', {ACCEPTED_FILE_TYPES: ['jpeg', 'jpg', 'gif', 'bmp', 'tiff', 'tif', 'png', 'mp4'],MAX_FILE_SIZE_IN_BYTES: 20 * 1024 * 1024,I18N_KEYS: {FILE_TYPE_INVALID: 'se.upload.file.type.invalid',FILE_SIZE_INVALID: 'se.upload.file.size.invalid'}})5) Copy the changed files into the services folder of your newly created extension
6) Delete all files and references for abAnalytics

You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
omkar76 can you please share the steps for component changes in front end (angular changes)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Geff, I will share to you. it is little bit complex.But i tell you process to customize own angular directory and achieve it. 1. create custom smartedit extension 2. define cms structure type as media for your media attribute. see below
<property name="cmsStructureType" value="media" />
</bean>
call bean id here ..........
<property name="populators">
<list>
<ref bean="mediaUploadVideoTypeAttributePopulator" />
</list>
</property>
</bean>
then go to your custom smartedit extension and create media folder which you are define in cms structure type.
4.Inside media folder create as custom directory which are created as exists media just follow same structure and use exist rest media api for add media , remove, and replace also.
I hope that it will help to you. i have done from scratch particular m4 video upload only. I might be you little bit stuck to create isolated scope directory file upload.if you are good in angularjs then no problem. Let me know if you find something problem.
Viele Grusse, Singh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.