GNU social

Check-in [321506f911]
Login

Check-in [321506f911]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Append missing attachment directory path When I switch avatar by Qvitter profile, there is only filename. PHP could not find file. So I append attachment directory path.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 321506f911514a81c3521931b287b81802fb543e17e56756d5f633978ea50134
User & Date: develop@senooken.jp 2023-02-27 11:41:14
Context
2023-08-21
13:48
Merge branch 'fix-duplicate-and-tree' of tak4/gnusocial-jp into main check-in: 9f9b4b09c5 user: gogitservice@gmail.com tags: trunk
2023-08-20
15:00
Fix duplicated post with activity between remote GNU social server. (and keep remote conversation tree.) issue "Duplicated post with activity (like/reply/repost) between remote GNU social server": https://notabug.org/gnusocialjp/gnusocial/issues/10 check-in: 7a0dc33047 user: tak4@mx.bibi.moe tags: trunk
2023-05-09
12:21
Fix markdown codeblock format check-in: 45fa1db398 user: develop@senooken.jp tags: trunk, develop
2023-02-27
11:54
Guard missing notice for local only or domain blocked server Leaf check-in: aff95df746 user: develop@senooken.jp tags: trunk, fix-missing-notice
11:54
Allow underscore in nickname Leaf check-in: 83251e6afd user: develop@senooken.jp tags: trunk, allow-underscore-in-nickname
11:41
Append missing attachment directory path When I switch avatar by Qvitter profile, there is only filename. PHP could not find file. So I append attachment directory path. check-in: 321506f911 user: develop@senooken.jp tags: trunk
2023-02-18
11:17
Guard to avoid 500 error for missing notice Closed-Leaf check-in: 1dfd0e54a2 user: develop@senooken.jp tags: trunk, media-uploading
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to lib/media/mediafile.php.

702
703
704
705
706
707
708

709
710
711
712
713
714
715
                common_log(LOG_ERR, 'File could not be moved (or chmodded) from ' . _ve($stream['uri']) . ' to ' . _ve($filepath));
                // TRANS: Client exception thrown when a file upload operation fails because the file could
                // TRANS: not be moved from the temporary folder to the permanent file location.
                throw new ClientException(_m('File could not be moved to destination directory.'));
            }
        }


        return new self($filename, $mimetype, $filehash);
    }

    /**
     * Attempt to identify the content type of a given file.
     *
     * @param string $filepath filesystem path as string (file must exist)







>







702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
                common_log(LOG_ERR, 'File could not be moved (or chmodded) from ' . _ve($stream['uri']) . ' to ' . _ve($filepath));
                // TRANS: Client exception thrown when a file upload operation fails because the file could
                // TRANS: not be moved from the temporary folder to the permanent file location.
                throw new ClientException(_m('File could not be moved to destination directory.'));
            }
        }

        $filename = File::path($filename, common_config('attachments', 'dir'), false);
        return new self($filename, $mimetype, $filehash);
    }

    /**
     * Attempt to identify the content type of a given file.
     *
     * @param string $filepath filesystem path as string (file must exist)