Remove Dropbox Onebox For Audio Links

AI-generated summary

The discussion revolves around the issue of Dropbox links not playing audio files within Discourse due to Dropbox’s policy of not allowing off-site streaming.

JamesNorth initially asked how to remove the onebox formatting for Dropbox audio links. Falco suggested adding ?dl=1 to the link, which may work in some cases. However, craigconstantine reported that this solution no longer works in Safari.

Falco recommended uploading files directly to Discourse or using alternative media hosting services. steveh suggested that editing the Dropbox share link to end with ?raw=1 might work, but craigconstantine reported that this solution also no longer works in Safari.

JQ331 summarized the issue and suggested that turning off oneboxing for Dropbox audio links would be the best solution, as users may not understand the technical issues.

Codinghorror suggested adding dropbox.com to the “blocked onebox domains” in the site settings, which JQ331 tested and found to be partially effective, blocking oneboxing for audio files but not for images. Simon_Manning suggested that the issue may be due to the different domains used for audio and image files.

Hi All,

The Dropbox Onebox works great generally - the pretty box with the folder/file name etc .. but with some individual files (like mp3 etc) it attempts to ‘play’ the file with the inbuilt audio player.

https://www.dropbox.com/s/5n413v2420pgslc/James%20and%20Ric%202017.mp3?dl=0

Becomes

Now, Dropbox kind of doesn’t allow that kind of off-site streaming thing - it prefers you to land on their page and play it with their audio player.

  • Is there a way to remove the onebox formatting on a link?
  • Or, can the media player not attempt to play files from the Dropbox (and probably other cloud formats?) domain(s)
5개의 좋아요

https://www.dropbox.com/s/5n413v2420pgslc/James%20and%20Ric%202017.mp3?dl=1

dl=1 works.

It’s a very strange quirky at Dropbox side, they should use the imgur convention (with file externsion is hotlinking and without a html page).

8개의 좋아요

Odd - good tip for now … I’ll try to edit posts to dl=1.

I guess they are all going to have different conventions.

3개의 좋아요

오래된 스레드를 되살리는 거라는 건 알지만… 어쨌든 여기 Big Sur에서 모든 게 최신 상태인데, 이 Dropbox URL들이 Safari에서 더 이상 재생되지 않아요. *한숨* . . .

1개의 좋아요

아마도 파일이 삭제되었기 때문일까요? 드롭박스에서 새로운 파일을 몇 개 받아서 테스트해 볼 수 있습니다:

5개의 좋아요

@Falco 답변에 첨부된 오디오 파일을 재생 버튼을 클릭하면 로딩 스피너가 계속만 돌아요.

주소를 가져가면…

다음과 같습니다.

https://www.dropbox.com/s/yerjh0ddm6rjs21/Wakka%20Wakka.mp3?dl=1
1개의 좋아요

데스크톱과 모바일 모두에서 정상적으로 작동하지만, 여러 번의 리다이렉트가 문제를 일으키기 쉽다는 점은 이해합니다. 해당 파일을 Discourse에 직접 업로드하는 것을 권장합니다.

2개의 좋아요

아! 좋은 지적이네요…

HTTP/2 301 cache-control: no-cache,no-cache, no-store content-security-policy: sandbox content-type: text/html; charset=utf-8 date: Tue, 02 Mar 2021 16:17:05 GMT location: /s/dl/yerjh0ddm6rjs21/Wakka%20Wakka.mp3 pragma: no-cache referrer-policy: strict-origin-when-cross-origin server: envoy set-cookie: locale=en; Domain=dropbox.com; expires=Sun, 01 Mar 2026 16:17:05 GMT; Path=/; secure set-cookie: gvc=OTUwNzQ0Mzc3NzU2NjkxODM4OTE4NDk0MDgxMjAwNjgxMDIxMA%3D%3D; expires=Sun, 01 Mar 2026 16:17:05 GMT; httponly; Path=/; secure set-cookie: flash=; Domain=dropbox.com; expires=Tue, 02 Mar 2021 16:17:05 GMT; Path=/; secure set-cookie: puc=; expires=Tue, 02 Mar 2021 16:17:05 GMT; httponly; Path=/; secure set-cookie: bang=; Domain=dropbox.com; expires=Tue, 02 Mar 2021 16:17:05 GMT; Path=/; secure set-cookie: t=A0zo8e5fjm3PXvoUm3_M8Ore; Domain=dropbox.com; expires=Fri, 01 Mar 2024 16:17:05 GMT; httponly; Path=/; secure set-cookie: __Host-js_csrf=A0zo8e5fjm3PXvoUm3_M8Ore; expires=Fri, 01 Mar 2024 16:17:05 GMT; Path=/; secure x-content-type-options: nosniff x-frame-options: DENY x-permitted-cross-domain-policies: none x-robots-tag: noindex, nofollow, noimageindex x-xss-protection: 1; mode=block strict-transport-security: max-age=31536000; includeSubDomains strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-dropbox-response-origin: far_remote x-dropbox-request-id: 014773fffd9744368958f7bd03e74ae3

이것은 DB(드롭박스)가 우리가 (위에서 공유한 파일의 경우, 내 답변에 dl=1 URL을 넣으면) …를 사용하길 원한다는 것을 알려줍니다.

https://www.dropbox.com/s/dl/yerjh0ddm6rjs21/Wakka%20Wakka.mp3

이 URL은 다시 리다이렉트됩니다…

HTTP/2 302 cache-control: no-cache,no-cache, no-store content-security-policy: sandbox content-type: text/html; charset=utf-8 date: Tue, 02 Mar 2021 16:18:51 GMT location: https://uc210b381124f7e2c595f0144180.dl.dropboxusercontent.com/cd/0/get/BJ5026I61AGfxjUZw4UAy6BoWHpQbSEN0gROgXEQDAhej5g_ws5PGpMKoAWm2TFZ78wPD3W3jnOfiuXDCymHTnohQYszoTuUH5QxZXpRt3Ebjgzx5kywk-ucuWZRdlX1RC0/file?dl=1# pragma: no-cache referrer-policy: strict-origin-when-cross-origin server: envoy set-cookie: locale=en; Domain=dropbox.com; expires=Sun, 01 Mar 2026 16:18:51 GMT; Path=/; secure set-cookie: gvc=NjAxMjA0ODM0MjU5NzUxOTc0NzM5NTA4Mzk1NTUxODQ1NTYxMzI%3D; expires=Sun, 01 Mar 2026 16:18:51 GMT; httponly; Path=/; secure set-cookie: flash=; Domain=dropbox.com; expires=Tue, 02 Mar 2021 16:18:51 GMT; Path=/; secure set-cookie: puc=; expires=Tue, 02 Mar 2021 16:18:51 GMT; httponly; Path=/; secure set-cookie: bang=; Domain=dropbox.com; expires=Tue, 02 Mar 2021 16:18:51 GMT; Path=/; secure set-cookie: t=h92aZNHZPxQ0OvaeouTFBVK-; Domain=dropbox.com; expires=Fri, 01 Mar 2024 16:18:51 GMT; httponly; Path=/; secure set-cookie: __Host-js_csrf=h92aZNHZPxQ0OvaeouTFBVK-; expires=Fri, 01 Mar 2024 16:18:51 GMT; Path=/; secure x-content-type-options: nosniff x-frame-options: DENY x-permitted-cross-domain-policies: none x-xss-protection: 1; mode=block strict-transport-security: max-age=31536000; includeSubDomains strict-transport-security: max-age=31536000; includeSubDomains vary: Accept-Encoding x-dropbox-response-origin: far_remote x-dropbox-request-id: 29b87eb2e3ef458f9490ba6f202d95af

다음으로 리다이렉트됩니다:

https://uc210b381124f7e2c595f0144180.dl.dropboxusercontent.com/cd/0/get/BJ5026I61AGfxjUZw4UAy6BoWHpQbSEN0gROgXEQDAhej5g_ws5PGpMKoAWm2TFZ78wPD3W3jnOfiuXDCymHTnohQYszoTuUH5QxZXpRt3Ebjgzx5kywk-ucuWZRdlX1RC0/file?dl=1#

자, 여기에 넣어보면 어떤지 봅시다 . . .

https://uc210b381124f7e2c595f0144180.dl.dropboxusercontent.com/cd/0/get/BJ5026I61AGfxjUZw4UAy6BoWHpQbSEN0gROgXEQDAhej5g_ws5PGpMKoAWm2TFZ78wPD3W3jnOfiuXDCymHTnohQYszoTuUH5QxZXpRt3Ebjgzx5kywk-ucuWZRdlX1RC0/file?dl=1#

¯\_(ツ)_/¯ 드롭박스를 사용하지 않는 이유 목록에 추가할 또 다른 이유입니다.

2개의 좋아요

공정하게 말하자면, Dropbox는 Imgur처럼 핫링크가 가능한 스토리지 서비스라고 주장한 적이 없습니다.

이러한 미디어 파일을 사용하여 Discourse를 광범위하게 사용하시려면 다음과 같은 다양한 대안이 있습니다:

  • Discourse에 직접 업로드 (선택적으로 객체 스토리지 서비스로 백업하고 CDN으로 보호할 수 있음)
  • YouTube, Vimeo, Soundcloud, Peertube 등 임베드를 허용하는 수십 개의 전문 미디어 호스팅 서비스
3개의 좋아요

@craigconstantine 님, 반갑습니다. 원래 드롭박스 공유 링크의 끝에 dl=0이 있는 경우를 기억하시나요? 이 부분을 raw=1로 수정하면 대부분의 사용자가 다른 OS와 브라우저를 사용하더라도 재생기로 작동할 것입니다. 자세한 내용은 DB에 나와 있지만, 여러 리다이렉트에 대해서는 조금 놓치고 있는 것 같습니다. 도움이 되길 바랍니다.

https://www.dropbox.com/s/yerjh0ddm6rjs21/Wakka%20Wakka.mp3?raw=1

2개의 좋아요

…아니, 그게 바로 핵심이야. Safari에서는 더 이상 작동하지 않아. mp3에 대한 드롭박스 URL이 오디오 플레이어로 보이는 것을 생성하지만, 실제로는 재생되지 않아.

1개의 좋아요

죄송합니다 - 과거 게시물을 충분히 읽지 못했습니다.

Mac에서 Chrome을 사용할 때 가끔 재생되지 않는 경우가 있는데, 강제 새로고침(Chrome에서 Cmd-Shift-R)을 하면 페이지가 다시 로드되어 재생이 가능합니다. Safari에서는 Shift를 누른 채 새로고침을 하지만, 그래도 재생되지 않습니다.

이제 파악했습니다 - Safari에서는 로딩 표시가 회전하다가 이 화면이 나옵니다.

저는 아직 Catalina를 사용 중인데 작동하지 않습니다 - 어떤 부분에서 변경이 있었을까요?

아마도 예쁜 플레이어들을 피해야 할 것 같고, 그렇게 되면 아쉬울 것 같습니다 - 링크를 인라인 HTML 하이퍼텍스트로 포함할 경우, dl=0으로 끝나는 Dropbox 공유 링크는 새 브라우저 창과 Dropbox 미리보기 및 재생 페이지를 생성하고, dl=1은 다운로드를 강제하며, raw=1은 Discourse와 같은 예쁜 플레이어와 함께 새 브라우저 창을 생성하고 재생을 시작합니다. 도움이 될지는 모르겠지만, 여러분에게 유용한 옵션이 될 수 있습니다.

@Falco 님, 그러면 관리자 설정에서 업로드 파일 크기 제한을 조정해야 하나요? 아니면 이전에 언급하신 객체 저장소 서비스/CDN을 사용해야 하나요?

기본 제한보다 큰 파일을 업로드할 계획이 있다면 Change the maximum attachment/upload size 링크에 따라 이를 증가시킬 수 있습니다.

객체 저장소 서비스 비용을 지불할 수 있고 커뮤니티에서 큰 파일을 업로드할 예정이라면, 그것은 분명히 올바른 선택입니다 :+1:

1개의 좋아요

안녕하세요. 이 스레드를 방금 봤습니다. 제가 이해한 대로 내용을 정리하면 다음과 같습니다:

  1. 현재 discourse에 dropbox 오디오 링크를 포함하면 이를 “onebox” 처리하려고 시도합니다. 즉, 링크를 discourse 게시물 내에서 바로 재생할 수 있는 오디오 플레이어로 변환하려고 합니다.

  2. 하지만 dropbox는 원격 재생을 허용하지 않습니다. 따라서 사용자는 실제로 재생되지 않는 오디오 플레이어만 보게 됩니다. 링크 끝에 ?d1=1을 추가하여 오디오 플레이어 재생을 활성화할 수 있지만, 대부분의 브라우저에서는 이 방법도 실제로 작동하지 않습니다(예: 제 최신 버전의 chrome에서는 작동하지 않음).

  3. 대안으로 파일을 직접 업로드하도록 할 수 있지만, 오디오 파일은 용량이 클 수 있어 비용이 많이 들 수 있으며, dropbox가 아닌 다른 서비스를 사용할 수도 있습니다.

여기 첫 번째 게시물에 있는 원래 질문은 여전히 유효해 보입니다. one-boxing이 “작동하지 않는” 경우라면, 해당 링크에 대한 oneboxing을 끄는 것이 좋겠습니다. 그러면 사용자가 가장 직관적인 결과를 얻을 수 있기 때문입니다. 즉, dropbox의 실제 파일에 접근할 수 있는 링크를 제공하는 것입니다.

사용자들은 제가刚才 정리한 1~3단계 과정을 이해하지 못할 가능성이 큽니다. 그들은 dropbox 링크가 (1) 자동으로 재생되거나, (2) dropbox 사이트로 이동하여在那里 재생된다고만 가정할 것입니다. 따라서 파일이 재생되지 않는 경우, 파일을 보기 위해 dropbox로 이동할 수 있는 링크를 클릭만 하면 되도록 하는 것이 좋겠습니다.

사이트 설정의 "차단된 원박스 도메인"에 dropbox.com(또는 해당되는 정확한 도메인 이름)을 입력해 보셨나요?

좋은 생각입니다–테스트를 해봤는데, 놀라운 결과가 나왔습니다:

  1. 차단된 원박스(onebox) 도메인 설정에 다음을 입력했습니다: www.dropbox.com, https://dropbox.com, dropbox, https://www.dropbox.com (어떤 형식이 정확한지 확신이 없었기 때문에 모든 경우의 수를 커버하고 싶었습니다).

  2. 그렇게 한 후, 오디오 파일은 원박스로 변환되거나 (사용할 수 없는) 오디오 플레이어로 바뀌지 않았습니다–그냥 드롭박스 링크 그대로 유지되었습니다. 드롭박스가 드롭박스 사이트 이외에서는 오디오를 재생하지 않는 한, 오디오에 대해서는 이것이 가장 좋은 결과인 것 같습니다.

  3. 하지만: 드롭박스가 차단된 원박스 도메인 설정에 입력되어 있음에도 불구하고, 다른 드롭박스 원박싱이 여전히 발생하는 것 같았습니다 (놀랍게도). 예를 들어, 드롭박스 이미지 링크를 붙여넣으면 discourse 게시물에 이미지 자체가 그대로 표시되었습니다.

1개의 좋아요

추측컨대, 오디오 URL이 www.dropbox.com에 있었고, 입력한 첫 번째 값에 의해 차단된 반면, 이미지는 dropbox.com 또는 somethingelse.dropbox.com에 있어서 입력한 다른 값들에 의해 차단되지 않았을 가능성이 있습니다.

설명이 완전히 명확하지는 않지만, 해당 설정은 입력된 도메인과 모든 하위 도메인에 적용됩니다. 따라서 정확히 dropbox.com을 입력하면 dropbox.com, www.dropbox.com, anythingelse.dropbox.com이 모두 차단됩니다.

1개의 좋아요