Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hub
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Package registry
Operate
Terraform modules
Analyze
Contributor analytics
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
thomasDOTwtf
hub
Commits
5507c65e
Commit
5507c65e
authored
5 months ago
by
Andreas Hubel
Committed by
Roang
5 months ago
Browse files
Options
Downloads
Patches
Plain Diff
fix(scheduleimport): use ContentFile instead of BytesIO
parent
f3284da4
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/core/utils.py
+2
-2
2 additions, 2 deletions
src/core/utils.py
with
2 additions
and
2 deletions
src/core/utils.py
+
2
−
2
View file @
5507c65e
...
@@ -6,13 +6,13 @@ import subprocess
...
@@ -6,13 +6,13 @@ import subprocess
import
tempfile
import
tempfile
import
uuid
import
uuid
from
datetime
import
UTC
,
datetime
,
timedelta
from
datetime
import
UTC
,
datetime
,
timedelta
from
io
import
BytesIO
from
pathlib
import
Path
from
pathlib
import
Path
from
string
import
ascii_letters
,
digits
from
string
import
ascii_letters
,
digits
from
urllib.parse
import
parse_qs
,
urlparse
,
urlunparse
from
urllib.parse
import
parse_qs
,
urlparse
,
urlunparse
import
requests
import
requests
from
django.core.files.base
import
ContentFile
from
django.urls
import
NoReverseMatch
from
django.urls
import
NoReverseMatch
from
django.utils.functional
import
cached_property
from
django.utils.functional
import
cached_property
from
django.utils.html
import
strip_tags
from
django.utils.html
import
strip_tags
...
@@ -217,7 +217,7 @@ def download_from_url(url: str) -> tuple[str, bytes]:
...
@@ -217,7 +217,7 @@ def download_from_url(url: str) -> tuple[str, bytes]:
# read the binary content
# read the binary content
r
.
raw
.
decode_content
=
True
r
.
raw
.
decode_content
=
True
data
=
BytesIO
(
r
.
content
)
data
=
ContentFile
(
r
.
content
)
# return the result
# return the result
return
filename
,
data
return
filename
,
data
...
...
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