Issue with creation of versions when a file is uploaded to DAM - creates a folder instead of the version (jcr:primaryType - sling:OrderedFolder) | Community
Skip to main content
Level 2
October 16, 2015
Solved

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

  • October 16, 2015
  • 2 replies
  • 1184 views

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.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Sham_HC

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.

2 replies

Sham_HC
Sham_HCAccepted solution
Level 10
October 16, 2015

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.

smacdonald2008
Level 10
October 16, 2015
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.