-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
upgrade to fsdb v0.3.2 #133
Conversation
well, I don't think this is a great approach. I think that this is the right moment to polish the code and make it unit-testable. Right now, it's not. I have really no hurry in upgrading to fsdb v0.3.2, and prefer to wait a bit and have better code quality in libreant than just "patching" the new method names. The point is that a real, meaningful migration to fsdb v0.3 also means using buffers instead of paths. Doing so is a not-so-small change, so proper testing is required. Look at my branch (I left a comment on #132 about it), I hope you like it. |
No. It's necessary. Fsdb had a big bug in the previous version.
polish the code and make it unit-testable have nothing to do with this commit, really nothing.
In some function that we use paths are better then streams: fsdb has some optimization for paths (buffer sizing) and flask does not provide some functionality with streams. In addition it's easy to mess up things with seekable streams. This is a very small change that keeps things working without bugs. Please consider merging it. |
On Tue, Mar 24, 2015 at 02:36:34PM -0700, ael wrote:
which one? so maybe we should add the "bug" label to #132
indeed :) the point is that I don't want to lose such an occasion. If
You are talking about the X-Sendfile feature? is it important at all? |
On 03/24/2015 10:49 PM, BoySka wrote:
I promise.
I'm talking about X-Sendfile and mimetype guessing. They are not so |
ok, I add the 'bug' label. This changes everything! By the way, I believe (but I am not sure) that a release that needs to
mimetype guessing is slightly more important, IMHO, so ok. summing it up: I will soon test your commit and, if it behaves |
waiting :) |
I'm sorry, I'm really busy in this period. If anyone else wants to step |
upFile.save(tmpFilePath) | ||
fileInfo = {} | ||
fileInfo['name'] = secure_filename(upFile.filename) | ||
fileInfo['size'] = os.path.getsize(tmpFilePath) | ||
fileInfo['mime'] = upFile.mimetype | ||
fileInfo['notes'] = request.form[upName+'_notes'] | ||
fileInfo['sha1'] = Fsdb.fileDigest(tmpFilePath, algorithm="sha1") | ||
fileInfo['sha1'] = calc_file_digest(tmpFilePath, algorithm="sha1") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have called this simply file_digest
and digest
, but antani :P
both your comments are correct but related to fsdb and not to libreant. |
As discussed yesterday, assigned to @leophys Un applauso per l'accollo! |
👏 👏 🎉 |
Tested. It works. |
No description provided.