简体   繁体   English

我的springboot应用程序在openshift上创建一个pdf文件,如何获取该文件的url

[英]My springboot application creates a pdf file on openshift how do I get url for that file

My springboot application generates a pdf file on openshift. 我的springboot应用程序在openshift上生成一个pdf文件。 How do I get correct URL for that file? 如何获得该文件的正确URL?
I use below code to create pdf file: 我使用以下代码创建pdf文件:

        Blob blob = document.getScanned();
        fileName = document.getFileName() ;
        InputStream in = blob.getBinaryStream();
        int fileLength = in.available();

        OutputStream out = new FileOutputStream(fileName);
        byte[] buff = blob.getBytes(1,fileLength);
        out.write(buff);
        out.close()

I am able to access pdf file on local tomcat server http://localhost:8080/filename , but for openshift server when try to access the file with http://DonmainName/filename I am not getting the pdf file. 我能够访问本地tomcat服务器http:// localhost:8080 / filename上的pdf文件,但是对于openshift服务器,当尝试使用http:// DonmainName / filename访问文件时,我没有得到pdf文件。

Please advice. 请指教。 Thank you 谢谢

Openshift does not support url's for files created in application to used openly. Openshift不支持在应用程序中创建的文件的URL公开使用。

I am using amazon s3 for documents. 我正在使用Amazon S3进行文档处理。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM