
Update
This link can get duration: from @safwan https://appwrite.homestorages.xyz/v1/storage/buckets/642a43dc6cb7bc73d7b1/files/642a43e88296d58d018c/view?project=642a43d5940c0393b909
Duration is null: from sound helix: https://appwrite.homestorages.xyz/v1/storage/buckets/642a43dc6cb7bc73d7b1/files/642a440ebb4183facbcf/view?project=642a43d5940c0393b909 from pixabay: https://appwrite.homestorages.xyz/v1/storage/buckets/642a43dc6cb7bc73d7b1/files/642a43f23f1f8ddae214/view?project=642a43d5940c0393b909 https://appwrite.homestorages.xyz/v1/storage/buckets/642a43dc6cb7bc73d7b1/files/642a5cc1b509c7238af8/view?project=642a43d5940c0393b909 from audio jungle: https://appwrite.homestorages.xyz/v1/storage/buckets/642a43dc6cb7bc73d7b1/files/642a635437f2d2b87f08/view?project=642a43d5940c0393b909
Test in flutter android platform. Using just_audio package. appwrite version 1.2.1 with default setting use local storages
docker run -it --rm \
--volume /var/run/docker.sock:/var/run/docker.sock \
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
--entrypoint="install" \
appwrite/appwrite:1.2.1

Thanks for posting this here. I'll have to check a few things, but I may not have time until Monday

Are you using the view or download endpoint?

Is there any range headers in the request headers?

Using view link. but both link can not get duration. This is first request not include request range in headers. I open this link in browser by default and inspect this

If you really want to modify the code, you can look into modifying this handler: https://github.com/appwrite/appwrite/blob/e8c74d7204258133a61db09ed518211170e751d9/app/controllers/api/storage.php#L1098

I sort of expect the content header to be there: https://github.com/appwrite/appwrite/blob/e8c74d7204258133a61db09ed518211170e751d9/app/controllers/api/storage.php#L1233

Trying modify I'm adding content-length by size but I don't know I can not see this in response. I'm add x-content-length for test and I can see this in response but not anything of content-length. Sorry but I'm stupid in server side code

response with status code 200

How can I build production image from source or just change .env file? Please give any document can help me

honestly, i wouldn't build an image. i would just mount in a modified file

anyways, I've done some testing and I do get a content-length for my files...

also, I tested against this file: https://www2.cs.uic.edu/~i101/SoundFiles/BabyElephantWalk60.wav, but i couldn't get the duration from:
const fileUrl =
'https://www2.cs.uic.edu/~i101/SoundFiles/BabyElephantWalk60.wav';
_player.setUrl(fileUrl).then((value) {
setState(() {
_duration = _player.duration;
});
});


My app can get duration with your audio file, this is helpful for me. How can I modify it.

Need content-length in response with status code 200 not 206. Because just_audio read conent-length in first request with status code 200 and save it as duration

Look at your status code or modify content-range return full range of file. If I request with range in headers using just_audio then my audio file is the same duration in any url

Appwrite server use Transfer-Encoding: chunked in headers

Just mount modified file in first appwrite container or every appwrite container in docker-compose file

The appwrite container should be enough

How are you getting the duration?

Using durationStream

But with file uploaded to appwrite server can not get duration

And are you testing on web?

Mobile only
Recommended threads
- Selfhosting problem
I'm migrating from cloud to self-hosted. I tried using 'Export to self-hosted instance' and use my free Ngrok domain as Endpoint self-hosted instance, but I got...
- Getting issue while migrating from Self ...
i try to migrating my project but when do this error come and dont allow to crate that migration
- Pending upload some file, but not for ot...
When upload this file, always got pending. But when I upload another file, it works. Why?
