Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ckanext-odsh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open-Data
ckanext-odsh
Commits
d567b490
Commit
d567b490
authored
4 years ago
by
Jesper Zedlitz
Browse files
Options
Downloads
Patches
Plain Diff
Kopieren von Dateien während des Harvest-Prozesses konfigurierbar
parent
b02664af
No related branches found
No related tags found
1 merge request
!17
Stage System soll in Zukunft Master Branch erhalten
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
ckanext/odsh/logic/action.py
+10
-5
10 additions, 5 deletions
ckanext/odsh/logic/action.py
with
10 additions
and
5 deletions
ckanext/odsh/logic/action.py
+
10
−
5
View file @
d567b490
...
@@ -5,6 +5,7 @@ import ckan.model as model
...
@@ -5,6 +5,7 @@ import ckan.model as model
import
ckan.lib.dictization.model_dictize
as
model_dictize
import
ckan.lib.dictization.model_dictize
as
model_dictize
from
ckan.lib.munge
import
munge_title_to_name
from
ckan.lib.munge
import
munge_title_to_name
import
ckan.plugins.toolkit
as
toolkit
import
ckan.plugins.toolkit
as
toolkit
from
pylons
import
config
from
ckan.lib.search.common
import
make_connection
,
SearchError
from
ckan.lib.search.common
import
make_connection
,
SearchError
import
pysolr
import
pysolr
import
datetime
import
datetime
...
@@ -147,7 +148,11 @@ def autocomplete(context, data_dict):
...
@@ -147,7 +148,11 @@ def autocomplete(context, data_dict):
def
odsh_resource_create
(
context
,
data_dict
):
def
odsh_resource_create
(
context
,
data_dict
):
is_linked_resource
=
not
isinstance
(
data_dict
[
'
upload
'
],
cgi
.
FieldStorage
)
copy_remote_resources
=
toolkit
.
asbool
(
config
.
get
(
'
ckanext.odsh.copy_remote_resources
'
,
'
False
'
)
)
if
copy_remote_resources
:
is_linked_resource
=
(
not
'
upload
'
in
data_dict
)
or
(
not
isinstance
(
data_dict
[
'
upload
'
],
cgi
.
FieldStorage
))
if
is_linked_resource
:
if
is_linked_resource
:
_download_linked_resource_to_tmp
(
data_dict
[
'
url
'
])
_download_linked_resource_to_tmp
(
data_dict
[
'
url
'
])
_emulate_file_upload
(
data_dict
)
_emulate_file_upload
(
data_dict
)
...
...
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