Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ object CopyManager {
private val originMetadataKeys: util.List[String] = Platform.getStringList("content.copy.origin_data", new util.ArrayList[String]())
private val internalHierarchyProps = List("identifier", "parent", "index", "depth")
private val restrictedMimeTypesForUpload = List("application/vnd.ekstep.ecml-archive","application/vnd.ekstep.content-collection")

private val copyArtifactUrl = Platform.config.getBoolean("content.copy.is_copy_artifacturl")
private var copySchemeMap: util.Map[String, AnyRef] = new util.HashMap[String, AnyRef]()

def copy(request: Request)(implicit ec: ExecutionContext, oec: OntologyEngineContext, ss: StorageService): Future[Response] = {
Expand Down Expand Up @@ -73,7 +73,11 @@ object CopyManager {
val copyCreateReq: Future[Request] = getCopyRequest(node, request)
copyCreateReq.map(req => {
DataNode.create(req).map(copiedNode => {
artifactUpload(node, copiedNode, request)
if (copyArtifactUrl) {
artifactUpload(node, copiedNode, request)
} else {
Future(copiedNode)
}
}).flatMap(f => f)
}).flatMap(f => f)
}
Expand Down
1 change: 1 addition & 0 deletions content-api/content-service/conf/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,7 @@ actor.timeoutMillisec = 30000

#Index file validation
isIndexHtmlValidationRequired=true
content.copy.is_copy_artifacturl=true

cloud_storage_type=""
cloud_storage_key=""
Expand Down