inovector / mixpost

Mixpost - Self-hosted social media management software (Buffer alternative)
https://mixpost.app
MIT License
1.03k stars 164 forks source link

filesize(): stat failed #111

Open deevus opened 1 month ago

deevus commented 1 month ago

Steps to reproduce the problem

I am using an S3-compatible API for storage. When trying to post to Twitter, I get this error:

[ "filesize(): stat failed for https://s3.us-east-005.backblazeb2.com/doublewordlabs-mixpost-storage/08-2024/jZCuVBRD72xETfX87c50JTc3TljF45WaQBajeHHS.mp4" ]

Link to the file

According to the PHP docs, under the hood this uses the HTTP wrapper, which does not support stat()

Expected behaviour

I can post a video to Twitter

Actual behaviour

I cannot post a video to Twitter

Detailed description

No response

Specifications

Mixpost Lite 1.71.0

deevus commented 1 month ago

It looks like the calling function actually passes the total_bytes parameter, so it may be fixed by not making the filesize() call if total_bytes was already passed in through $parameters

GlobeMarket commented 1 month ago

Modifique o código para verificar se o parâmetro total_bytes está presente antes de chamar filesize(). Se total_bytes já estiver definido, pule a chamada para filesize().