Skip to main content
nhung.ng
Participating Frequently
May 13, 2024

allowedFileTypes doesn't work as expected

  • May 13, 2024
  • 4 replies
  • 1183 views

When using createDesign(), I defined my output param like this:

outputParams: {
    outputType: 'url',
    allowedFileTypes: ['video/mp4', 'image/png'],
}

 
But the Editor always allows to save all the types:

 

4 replies

nhung.ng
nhung.ngAuthor
Participating Frequently
May 31, 2024

@ru-howe Thank you for your help!

Just want to make a note so people who have the same issue will know:
The allowFileTypes should always be compatible with the input asset type. 
For example,
1. if allowFileTypes=['video/mp4', 'image/png', 'image/jpeg'] and asset,].type='image'; AE editor will show a select with 3 options: ["empty-option", "PNG", "JPEC"].
2. if allowFileTypes=['image/png', 'image/jpeg'] and asset,].type='image'; AE editor will show a select with 3 options: ["PNG", "JPEC"], with "PNG" as the default option.

freked
Known Participant
May 27, 2024

Hey @erinferinferinf any new update from the team? 🙂

Participant
May 27, 2024
Hi,

In case it's helpful, our use is slightly different in that we restrict to
MP4 if the user is creating a video, and to PNG or JPG if the user is
creating an image.

But it works fine with very similar params to yours. Although we pass the
values in as a variable that is set by another method, the content and
format is the same.

>From looking at yours, the only thing is that I might try is removing the
trailing comma, and try putting the image setting before the video.

Also maybe try testing with just png image and just video, and see if it
works to restrict them.

Ru

________________________


Ru Howe | Chief Design and Technology Officer
Stornaway Adaptive Interactive Video

What is Stornaway? Watch our 3 minute Demo Video at www.stornaway.io and
sign up for free.

🎓 EDUCATORS: Join us for free on 5th June for the 4th Academic Summit:
Adaptive and Immersive Storytelling in Education:
https://www.stornaway.io/academic-summit-4-adaptive-and-immersive-storytelling-in-education/
nhung.ng
nhung.ngAuthor
Participating Frequently
May 21, 2024

Hi @erinferinferinf, sorry for late reply

1. SDK URL:

https://sdk.cc-embed.adobe.com/v3/CCEverywhere.js

 

2. Params: 

ccEverywhere.createDesign({
				callbacks: {
					...createDesignCallback,
					onPublish: (publishParams: any) => {
						createDesignCallback.onPublish(publishParams, mediaName);
					},
				},
				modalParams: {
					canvasSize: 'Video',
					parentElementId: 'parentElementId',
				},
				inputParams: {
					editorPanelView: 'media',
					canvasSize: 'Video',
					asset: {
						// for now AE type: video is not working for some reason. Using image type worked for both image and video
						type: 'image',
						dataType: 'url',
						data: dataUrl,
					},
				},
				outputParams: {
					outputType: 'url',
					allowedFileTypes: ['video/mp4', 'image/png'],
				},
			});

 

erinferinferinf
Adobe Employee
Adobe Employee
May 14, 2024

Hi there!

 

I asked Engineering, and they said:

 

This scenario is working fine in the V3 version of SDK when tested on our side. Can we please check with the client and get the following details:
 
  1. SDK url they are using to integrate
  2. The whole list of params they are passing to the createDesign API