[dreamwidth/dw-free] 9ceb16: [#1928] croak if get_file_data fails in _resize me...
Branch: refs/heads/develop
Home: https://github.com/dreamwidth/dw-free
Commit: 9ceb16618f693ef4b891e6fbde2eec77b19c2a8a
https://github.com/dreamwidth/dw-free/commit/9ceb16618f693ef4b891e6fbde2eec77b19c2a8a
Author: Kareila <kareila@dreamwidth.org>
Date: 2017-01-08 (Sun, 08 Jan 2017)
Changed paths:
M cgi-bin/DW/Media/Photo.pm
Log Message:
-----------
[#1928] croak if get_file_data fails in _resize method
This replaces the current "Column 'height' cannot be null"
error from Image::Magick with a more informative error,
"Failed to load image file $mediaid for $username."
This would give a sysadmin the necessary information to
delete any rows from media and media_versions related
to the file not having been saved to MogileFS.
The error happens trying to display media that was
uploaded while MogileFS was in a read-only state.
Commit: fd469b55ea3d7c533100af179d29722e1077e6cc
https://github.com/dreamwidth/dw-free/commit/fd469b55ea3d7c533100af179d29722e1077e6cc
Author: Kareila <kareila@dreamwidth.org>
Date: 2017-01-08 (Sun, 08 Jan 2017)
Changed paths:
M cgi-bin/DW/Media.pm
Log Message:
-----------
[#1928] use eval to catch croaks from DW::Media->new
In get_active_for_user, the process of loading the
user's images would die if DW::Media->new failed
for any of the images.
This allows the process to complete and the page
to display normally minus the problematic images,
trapping any image errors in an eval statement
and printing them to the error log instead.
Commit: c6e320197a3f0b21f2f24d025eab1f004e1f4f37
https://github.com/dreamwidth/dw-free/commit/c6e320197a3f0b21f2f24d025eab1f004e1f4f37
Author: Kareila <kareila@dreamwidth.org>
Date: 2017-01-08 (Sun, 08 Jan 2017)
Changed paths:
M cgi-bin/DW/Media.pm
Log Message:
-----------
[#1928] create image in MogileFS before writing to db
This changes the order of operations in upload_media
to try to create the MogileFS file first - that way
if we get the "unable to instantiate file" error,
we haven't already created bogus rows in the media
and media_versions tables that would cause problems.
In order to do the MogileFS operation first, we need
to use the mogkey object method to get the file key,
but we can't use the new object method before the db
rows exist. The workaround is to bless a fake object
into the class using the minimal information needed to
use the mogkey method.
Yay for reducing the number of FIXME comments.
Commit: 7ac643c36da6ea7759b5e8ccfc2cd18ccf9bb4f5
https://github.com/dreamwidth/dw-free/commit/7ac643c36da6ea7759b5e8ccfc2cd18ccf9bb4f5
Author: Mark Smith <mark@qq.is>
Date: 2017-01-13 (Fri, 13 Jan 2017)
Changed paths:
M cgi-bin/DW/Media.pm
M cgi-bin/DW/Media/Photo.pm
Log Message:
-----------
Merge pull request #1932 from kareila/1928-file-edit
fixes for failed uploads breaking /file/edit page
Compare: https://github.com/dreamwidth/dw-free/compare/c78ee3a29493...7ac643c36da6
Home: https://github.com/dreamwidth/dw-free
Commit: 9ceb16618f693ef4b891e6fbde2eec77b19c2a8a
https://github.com/dreamwidth/dw-free/commit/9ceb16618f693ef4b891e6fbde2eec77b19c2a8a
Author: Kareila <kareila@dreamwidth.org>
Date: 2017-01-08 (Sun, 08 Jan 2017)
Changed paths:
M cgi-bin/DW/Media/Photo.pm
Log Message:
-----------
[#1928] croak if get_file_data fails in _resize method
This replaces the current "Column 'height' cannot be null"
error from Image::Magick with a more informative error,
"Failed to load image file $mediaid for $username."
This would give a sysadmin the necessary information to
delete any rows from media and media_versions related
to the file not having been saved to MogileFS.
The error happens trying to display media that was
uploaded while MogileFS was in a read-only state.
Commit: fd469b55ea3d7c533100af179d29722e1077e6cc
https://github.com/dreamwidth/dw-free/commit/fd469b55ea3d7c533100af179d29722e1077e6cc
Author: Kareila <kareila@dreamwidth.org>
Date: 2017-01-08 (Sun, 08 Jan 2017)
Changed paths:
M cgi-bin/DW/Media.pm
Log Message:
-----------
[#1928] use eval to catch croaks from DW::Media->new
In get_active_for_user, the process of loading the
user's images would die if DW::Media->new failed
for any of the images.
This allows the process to complete and the page
to display normally minus the problematic images,
trapping any image errors in an eval statement
and printing them to the error log instead.
Commit: c6e320197a3f0b21f2f24d025eab1f004e1f4f37
https://github.com/dreamwidth/dw-free/commit/c6e320197a3f0b21f2f24d025eab1f004e1f4f37
Author: Kareila <kareila@dreamwidth.org>
Date: 2017-01-08 (Sun, 08 Jan 2017)
Changed paths:
M cgi-bin/DW/Media.pm
Log Message:
-----------
[#1928] create image in MogileFS before writing to db
This changes the order of operations in upload_media
to try to create the MogileFS file first - that way
if we get the "unable to instantiate file" error,
we haven't already created bogus rows in the media
and media_versions tables that would cause problems.
In order to do the MogileFS operation first, we need
to use the mogkey object method to get the file key,
but we can't use the new object method before the db
rows exist. The workaround is to bless a fake object
into the class using the minimal information needed to
use the mogkey method.
Yay for reducing the number of FIXME comments.
Commit: 7ac643c36da6ea7759b5e8ccfc2cd18ccf9bb4f5
https://github.com/dreamwidth/dw-free/commit/7ac643c36da6ea7759b5e8ccfc2cd18ccf9bb4f5
Author: Mark Smith <mark@qq.is>
Date: 2017-01-13 (Fri, 13 Jan 2017)
Changed paths:
M cgi-bin/DW/Media.pm
M cgi-bin/DW/Media/Photo.pm
Log Message:
-----------
Merge pull request #1932 from kareila/1928-file-edit
fixes for failed uploads breaking /file/edit page
Compare: https://github.com/dreamwidth/dw-free/compare/c78ee3a29493...7ac643c36da6