2013-09-23 4 views
1

나는 'cloudinary', '1.0.63'을 사용하고 있습니다.보석을 통해 진부한 비공개 이미지 다운로드/첨부 URL 생성

Cloudinary::Utils.unsigned_download_url self.cloudinary_id, format: self.format, flags: :attachment 

이 공공 이미지와 함께 작동 :

내가 첨부 플래그를 사용 다운로드 URL을 생성합니다.

Cloudinary::Utils.private_download_url self.cloudinary_id, self.format, flags: :attachment 

이 마지막 반환 동일한 URL처럼 플래그 : 개인 이미지와 같은 달성하려고 할 때, 그것은하지 않습니다, 비록 : 첨부 파일이 없었다.

생성 된 URL에/fl_attachment를 추가하지 않으려 고 시도했습니다.

개인 이미지로 첨부 파일 URL을 생성 할 수 있습니까?

답변

3

다음과 같은 구문을 사용할 수 있습니다 :

위의
Cloudinary::Utils.private_download_url self.cloudinary_id, self.format, attachment: true 
+0

좋아! 이것에 대한 참조 링크가 있습니까? –

0

없음 "첨부 파일 : 진정한"나 (Cloudinary 보석 1.0.65)에 대한 작업의 opts,하지만이 작업을 수행합니다

options[:transformation][:flags] = "attachment" 

여러 개의 플래그가 필요한 경우 다음과 같이 기간을 가입하십시오.

첨부 플래그를 이와 같이 설정하면 위에서 언급 한 unsigned_download_url() 및 private_download_url() 메서드 및 #cloudinary_url 메서드 만 사용할 수 있습니다.

Cloudinary 변환 플래그 : http://cloudinary.com/documentation/image_transformations#reference

관련 문제