Expand my Community achievements bar.

SOLVED

Issue with creation of versions when a file is uploaded to DAM - creates a folder instead of the version (jcr:primaryType - sling:OrderedFolder)

Avatar

Level 2

Hi, I am using the below given AJAX request to upload an asset to DAM, along with submission of a form to the server.

$.ajax({
url: version_url,
type: 'POST',
data:'cmd=createVersion&_charset_=utf-8&%3Astatus=browser&comment=NewVersion&label=new',                            
success: function(data){},
failure :function(data){}
});

This works perfectly in my local and even I am able to create new versions for the file by passing "label" parameter empty (Read somewhere in the forum, that passing label as empty will create new versions with names 1.1, 1.2 etc.,)

After the application is hosted in an Apache web logic server, the versions are not getting created, instead it creates a folder of type - jcr:primaryType - sling:OrderedFolder

For example if i upload a file named, test.pdf, the name of the folder getting created under the DAM is like test.pdf.version.html

I can see these folders getting created in my CRXDE-Lite and i am not able to see the versions in DAM Admin page too. But i was able to create new versions through DAM admin page.

This issue seems to happen only in a server environment. If anybody has faced the same issue or someone has any idea to fix this issue, please reply. Thanks in advance.

1 Accepted Solution

Avatar

Correct answer by
Level 10

Sometimes need to have the content modifications applied in a certain order & weblogic might be sending different encoding.   Could you explicitly set enctype to 'multipart/form-data'  should do the trick.

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Sometimes need to have the content modifications applied in a certain order & weblogic might be sending different encoding.   Could you explicitly set enctype to 'multipart/form-data'  should do the trick.

Avatar

Level 10
This sounds like a bug when in a server environment. It should work the same as it does in your local environment. Please file a ticket.