Jump to content

How to upload files/images to another location


mcwaloy

Recommended Posts

I'm trying to set the file directories to another location entirely like using the Amazon S3. Getting the images is easy as I can set the url in the config files. But when it comes to uploading images, it's kinda difficult as I dont know what is the best way to do it.

 

I have an API that will handle the GET, POST, DELETE of files. How and WHERE to call the API especially for POSTing files (upload) in PS is my problem.

 

Is there a core class that handles all file/images/themes uploads/downloads that I can update and it will reflect on all file upload cases?

 

Please help!

Link to comment
Share on other sites

The most simple way for using services as S3 is to use them as media servers. The only thing you need to do in Prestashop is setting them in Advanced Settings->Performance->Media Servers

@musicmaster Thanks a lot for your response. Is there a way I can achieve this via the code apart from using the UI? 

 

And BTW, I went to the 'Performance' directory as specified but couldn't see where to update anything as such. I'm using PS 1.6.1.3

Link to comment
Share on other sites

How good did you look?

 

attachicon.gifmediaserver.jpg

 

Sorry, my bad. I was looking at the store hosted with them here instead of the one on my local pc - they are different. 

 

What do I enter in the the media server #? I entered one of my bucket folders endpoint in S3 but PS gave an error that it's invalid.

 

Moreso, S3 requires authentication and the likes, how do I make that happen? What else do I need to do? Where in the code do I need to update?

 

I'm sorry, I'm pretty new at this. Thanks a lot for helping again in advance.

Link to comment
Share on other sites

  • 2 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...