Get PPTx Directory issue

Hello Aspose Team!!

I have a little doubt in the directory related.
My explanation is here:

I’m cloning the first slide from a pptx file.
STEPs:

const FILE_DIR = “locally/war/html/folder/xyz.pptx”; // i.e my local dir.

  1. Presentation src;
  2. src = new Presentation(FILE_DIR);

    Lots of codes

Above code working properly. But when I’m giving the third party storage URL
(
const FILE_DIR = “https://s3.ap-south-1.amazonaws.com/ec2-13-126-59-226.ap-south-1.compute.amazonaws.com-xyz/files/xyz.pptx”; // i.e third-party storage dir.
)
, it is not working. And getting ERROR =>

Exception in thread “main” com.aspose.slides.exceptions.FileNotFoundException: Can’t find file: https://s3.ap-south-1.amazonaws.com/ec2-13-126-59-226.ap-south-1.compute.amazonaws.com-xyz/files/xyz.pptx

File name: https://s3.ap-south-1.amazonaws.com/ec2-13-126-59-226.ap-south-1.compute.amazonaws.com-xyz/files/xyz.pptx

Thanks in Advance!!!

@AbhiG,

I have observed the sample code shared by you and like to share that you cannot directly provide the download URL for instantiating Presentation object. If you ought to load any presentation from web source, you need to download that using your own code and then convert that to MemoryStream and load the stream using Presentation object. Presentation class allow loading presentation from local disk or from streams.

Ohh!!

got it. Thanks @mudassir.fayyaz

@AbhiG,

You are welcome.