Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openbis
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sispub
openbis
Commits
42921a23
Commit
42921a23
authored
9 years ago
by
jakubs
Browse files
Options
Downloads
Patches
Plain Diff
SSDM-3162: fix a problem when javascript uploader was using dss to call dss via apache
SVN: 35656
parent
a28ca886
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openbis_standard_technologies/dist/core-plugins/dataset-uploader/1/dss/reporting-plugins/dataset-uploader-api/dataset-uploader-api.py
+6
-5
6 additions, 5 deletions
...ting-plugins/dataset-uploader-api/dataset-uploader-api.py
with
6 additions
and
5 deletions
openbis_standard_technologies/dist/core-plugins/dataset-uploader/1/dss/reporting-plugins/dataset-uploader-api/dataset-uploader-api.py
+
6
−
5
View file @
42921a23
...
@@ -15,9 +15,9 @@
...
@@ -15,9 +15,9 @@
#
#
# IDataSetRegistrationTransactionV2 Class
# IDataSetRegistrationTransactionV2 Class
from
ch.systemsx.cisd.openbis.dss.client.api.v1
import
DssComponentFactory
from
ch.systemsx.cisd.openbis.generic.shared.api.v1.dto
import
SearchCriteria
from
ch.systemsx.cisd.openbis.generic.shared.api.v1.dto
import
SearchCriteria
from
ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SearchCriteria
import
MatchClause
,
SearchOperator
,
MatchClauseAttribute
from
ch.systemsx.cisd.openbis.generic.shared.api.v1.dto.SearchCriteria
import
MatchClause
,
SearchOperator
,
MatchClauseAttribute
from
ch.systemsx.cisd.openbis.dss.generic.shared
import
ServiceProvider
from
org.apache.commons.io
import
IOUtils
from
org.apache.commons.io
import
IOUtils
from
java.io
import
File
from
java.io
import
File
...
@@ -122,13 +122,14 @@ def insertDataSet(tr, parameters, tableBuilder):
...
@@ -122,13 +122,14 @@ def insertDataSet(tr, parameters, tableBuilder):
tempDirFile
.
mkdirs
();
tempDirFile
.
mkdirs
();
#tempDir = System.getProperty("java.io.tmpdir");
#tempDir = System.getProperty("java.io.tmpdir");
dss_component
=
DssComponentFactory
.
tryCreate
(
parameters
.
get
(
"
sessionID
"
),
parameters
.
get
(
"
openBISURL
"
));
session_token
=
parameters
.
get
(
"
sessionID
"
);
dss_service
=
ServiceProvider
.
getDssServiceRpcGeneric
().
getService
();
for
fileName
in
fileNames
:
for
fileName
in
fileNames
:
folderFile
=
File
(
tempDir
+
"
/
"
+
folderName
);
folderFile
=
File
(
tempDir
+
"
/
"
+
folderName
);
folderFile
.
mkdir
();
folderFile
.
mkdir
();
temFile
=
File
(
tempDir
+
"
/
"
+
folderName
+
"
/
"
+
fileName
);
temFile
=
File
(
tempDir
+
"
/
"
+
folderName
+
"
/
"
+
fileName
);
inputStream
=
dss_
component
.
getFileFromSessionWorkspace
(
fileName
);
inputStream
=
dss_
service
.
getFileFromSessionWorkspace
(
session_token
,
fileName
);
outputStream
=
FileOutputStream
(
temFile
);
outputStream
=
FileOutputStream
(
temFile
);
IOUtils
.
copyLarge
(
inputStream
,
outputStream
);
IOUtils
.
copyLarge
(
inputStream
,
outputStream
);
IOUtils
.
closeQuietly
(
inputStream
);
IOUtils
.
closeQuietly
(
inputStream
);
...
@@ -151,7 +152,7 @@ def insertDataSet(tr, parameters, tableBuilder):
...
@@ -151,7 +152,7 @@ def insertDataSet(tr, parameters, tableBuilder):
#Clean Files from workspace
#Clean Files from workspace
for
fileName
in
fileNames
:
for
fileName
in
fileNames
:
dss_
component
.
deleteSessionWorkspaceFile
(
fileName
);
dss_
service
.
deleteSessionWorkspaceFile
(
session_token
,
fileName
);
#Return from the call
#Return from the call
return
True
;
return
True
;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment