Upload FIles to the Cloud

  

Hi Guys!


I have a question.


I want to Upload files to the cloud and acess them via url.


Example:

     - I have a File (test.pdf) and i want to upload it to the cloud, then i want to acess the file with the url (https://<personal_space>/AppTest/Files/test.pdf)


Can someone Help me??


Regards,

Ângelo Cocharra

Hi Angelo,

The way to go is, in my opinion, to store the uploaded content to the database, and to retrieve the files via an eSpace that has the file name as input parameter. That'll give a slightly different URL than the one you want, but it will give all the benefits of security without having to deal with local file systems (if they are even accesible).

Hi Angelo,

You can import the pdf files into Resources folder of your project and use deploy to target directory option. You can use runtime path of the resource to view or download the pdf.

http://<personal_space>/<App_Name>/pdf_name.pdf


Thanks,

Sivaramakrishna Repalle


sivaramakrishna repalle wrote:

Hi Angelo,

You can import the pdf files into Resources folder of your project and use deploy to target directory option. You can use runtime path of the resource to view or download the pdf.

http://<personal_space>/<App_Name>/pdf_name.pdf


Thanks,

Sivaramakrishna Repalle


Yes, but i can only do that manually right?


I wanted a upload form that do automatically all those things, it's possible?


Regards,

Ângelo Cocharra


Hi Ângelo,

Did you see my reply? What Siva proposed is indeed a solution only for files you want to include at compile time.

Kilian Hekhuis wrote:

Hi Angelo,

The way to go is, in my opinion, to store the uploaded content to the database, and to retrieve the files via an eSpace that has the file name as input parameter. That'll give a slightly different URL than the one you want, but it will give all the benefits of security without having to deal with local file systems (if they are even accesible).

I already have the content (binary) and name of file stored in database, but how can i show the file? 


I mean if i upload a pdf, how can i show the pdf using the binary?


Regards,

Ângelo Cocharra

Solution

Hi Ângelo,

You should create a web screen that downloads the file in the preperation, based on the file name (or some other parameter you chose). Iirc, turn off "Save to Disk" and the browser should attempt to display the PDF.

Solution

Kilian Hekhuis wrote:

Hi Ângelo,

You should create a web screen that downloads the file in the preperation, based on the file name (or some other parameter you chose). Iirc, turn off "Save to Disk" and the browser should attempt to display the PDF.

Thank you, it worked perfectly.


Best Regards,

Ângelo Cocharra


Hi Ângelo,

That's good to hear, glad I could be of help.