Rust, WebAssembly 및 MozJPEG로 Discourse에서 더 빠르고 작은 업로드 | 블로그

@sam can we address the above before the release please?

6개의 좋아요

From what I can tell @andrei’s change was tightly scoped to the toolbar, increasing the scope so it also catches drag-and-drop and paste would be a bit risky for the release.

Also unsure if we want to do that?

10개의 좋아요

5 posts were split to a new topic: Caret moves to end-of-line when uploading an image via toolbar

I’ll fix it and then we can decide if the fix is dangerous to merge before release.

7개의 좋아요

As I remember and from what I see in the code, it doesn’t matter if an image was added using toolbar or using drag-and-drop. In both cases, this should work.

Also, I tested it and looks like now everything works as expected (it’s hard to tell when exactly this was fixed, but I think it’s not so important). Here are videos for drag-and-drop, but it also works when using toolbar.

In the middle of the line:

At the end of the line:

At the end of the last line:

8개의 좋아요

Oh yeah sorry that’s my fault I didn’t even tested it since the last video I uploaded. :confused: Now it works as expected :slightly_smiling_face: Thank you @andrei to check this.

6개의 좋아요

Saw a Reddit post about a promotional press image for Diablo IV that is 109MB in size and 12000x12000 and wondered if it would be possible to upload it to Discourse, and if so, how long it would take.

Managed to upload it from my phone in just 20 seconds for processing and upload :tada:

It was downscaled to 1920x1920 and 208KB.

10개의 좋아요

Note, on iPhone that image is a consistent crash

8개의 좋아요

Which iPhone? I can open it in browser and locally just fine.




4개의 좋아요

It crashes Safari if you try to upload the 100mb file, somehow the flow triggers an out of memory

7개의 좋아요

Oh that may be the key to the crashing bug @martin been hunting down!

8개의 좋아요

Weird, on my 2017 iPad with 4GB RAM it fails to compress, but it does gracefully as it gets detected and then the original image goes forward in the upload process.

@sam can you try running http://clb.confined.space/dump/mem_growth.html and clicking until you get the max? Does it crash the tab for you? My old iPad goes to 900MB but doesn’t crash.

4개의 좋아요

I did try it but also no crash observed at all… :thinking:

5개의 좋아요

Note… this is now disabled by default pending fixes from Apple

https://github.com/discourse/discourse/pull/19790

6개의 좋아요

Let me try this and see..

I can download the giant image to my phone but get

Sorry, the image you are trying to upload is too big (maximum size is 4MB), please resize it and try again

When I attempt to upload it

5개의 좋아요

Sadly Apple have too many bugs here, we were forced to disable the feature on iOS due to missing standards and frequent crashes, we have a reminder set to try again in a few months

9개의 좋아요

여기 아주 좋은 소식이 있습니다. 여러 차례의 시도 끝에 @pmusaraj 님이 마침내 iOS의 버그를 우회하는 방법을 찾아냈습니다. 이는 이제 iOS에서 엄청나게 큰 이미지를 업로드할 수 있으며, 우리는 이를 실시간으로 최적화한다는 뜻입니다.

또한 시대에 부응하기 위해 이미지 최대 업로드 크기를 10MB까지 늘렸습니다!

14개의 좋아요