Skip to content

Commit a2fd682

Browse files
achawkinsdcrosta
authored andcommitted
Small change to get styling right
1 parent 04106ce commit a2fd682

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

flask_pymongo/__init__.py

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -214,14 +214,7 @@ def get_upload(filename):
214214
response.make_conditional(request)
215215
return response
216216

217-
def save_file(
218-
self,
219-
filename,
220-
fileobj,
221-
base="fs",
222-
content_type=None,
223-
**kwargs,
224-
):
217+
def save_file(self, filename, fileobj, base="fs", content_type=None, **kwargs):
225218
"""Save a file-like object to GridFS using the given filename.
226219
227220
.. code-block:: python
@@ -248,9 +241,5 @@ def save_upload(filename):
248241
content_type, _ = guess_type(filename)
249242

250243
storage = GridFS(self.db, base)
251-
return storage.put(
252-
fileobj,
253-
filename=filename,
254-
content_type=content_type,
255-
**kwargs,
256-
)
244+
id = storage.put(fileobj, filename=filename, content_type=content_type, **kwargs)
245+
return id

0 commit comments

Comments
 (0)