U4-1444 - New Content and media API don't support HttpPostedFile for the Upload datatype

Created by Darren Ferguson 12 Jan 2013, 18:01:38 Updated by Sebastiaan Janssen 14 Jan 2013, 13:15:01

New Content and media API don't support HttpPostedFile for the Upload datatype.

Previous api alllowed:

doc.getProperty("upload").Value = myHttpPostedFile;

In the new API - the following:

doc.SetValue("upload", myHttpPostedFile);

throws and exception:

"Type validation failed. The value type: 'HttpPostedFile' does not match the DataType in PropertyType with alias: 'file'"

The same happens for media items.

Comments

Morten Christensen 13 Jan 2013, 07:18:23

There should be an extension that excepts a HttpPostedFile, so there most be a shortcoming somewhere. I'll test and fix.


Morten Christensen 13 Jan 2013, 10:54:42

Given this issue some more thought I now know what the problem is. The "main" SetValue method accepts an object, and the extensions accept a HttpPostedFile/Base/Wrapper, but its obviously not going to reach these as a HttpPostedFile is also an object. Doh!


Priority: Normal

Type: Bug

State: Fixed

Assignee: Morten Christensen

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 6.0.0

Due in version: 6.0.0

Sprint:

Story Points:

Cycle: