mirror of
http://gitea.phreedom.club/localhost_frssoft/pleroma-cli
synced 2025-01-12 05:29:31 +00:00
Files reply upload
This commit is contained in:
parent
e91e401a4a
commit
49ebf083e1
|
@ -804,7 +804,7 @@ delete_api_status()
|
||||||
write_api_status()
|
write_api_status()
|
||||||
{
|
{
|
||||||
if [ -n "$mediaattach" ]; then
|
if [ -n "$mediaattach" ]; then
|
||||||
media=$(upload_api_media | jj id)
|
media=$mediaattach
|
||||||
post_request --url "$instance_point"/statuses \
|
post_request --url "$instance_point"/statuses \
|
||||||
--data-urlencode "status@$1" \
|
--data-urlencode "status@$1" \
|
||||||
--data-raw "content_type=$content_type" \
|
--data-raw "content_type=$content_type" \
|
||||||
|
@ -831,7 +831,7 @@ edit_api_status()
|
||||||
upload_api_media()
|
upload_api_media()
|
||||||
{
|
{
|
||||||
post_request --url "$instance_point"/media \
|
post_request --url "$instance_point"/media \
|
||||||
--form "file=$mediaattach"
|
--form "file=$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
write_status_menu()
|
write_status_menu()
|
||||||
|
@ -1011,6 +1011,18 @@ if [ "$daemon_mode" = 'yes' ]; then
|
||||||
'share') share_api_status $status_id ; rm "$statuses_file_action" ;;
|
'share') share_api_status $status_id ; rm "$statuses_file_action" ;;
|
||||||
'reply')
|
'reply')
|
||||||
replyto=$status_id
|
replyto=$status_id
|
||||||
|
if [ -d "$dir_status/attachments" ]; then
|
||||||
|
attach_id=''
|
||||||
|
echo "Uploading attachments..."
|
||||||
|
for attach in "$dir_status"/attachments/*; do
|
||||||
|
attach_id=$(upload_api_media "@$attach" | jj id)
|
||||||
|
attach_id="${attach_id},"
|
||||||
|
echo $attach_id
|
||||||
|
done
|
||||||
|
mediaattach=$(echo $attach_id | sed 's/,$//g')
|
||||||
|
echo $mediaattach
|
||||||
|
fi
|
||||||
|
|
||||||
write_api_status $dir_status/message
|
write_api_status $dir_status/message
|
||||||
rm "$statuses_file_action"
|
rm "$statuses_file_action"
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue