Upload files to Amazon S3 or Digital Ocean Spaces

I’d like files uploaded directly to Amazon S3 or to DigitalOcean Spaces as opposed to a local folder within my site directory.

My reason for wanting to do this is that I’d like for uploaded files to be encrypted at rest and I believe Amazon S3 and DigitalOcean Spaces (or DigitalOcean Block Storage Volumes) offers encryption at rest out of the box.

Is there a way that I can set my upload path to a folder that is outside of my site directory?

Thanks!

That is a very good request and very useful indeed specially when you need your files to be distributed with CDN

We will see what we can do about it

7 Likes

Thanks for upgrading this to a feature request, @George!

Also, being able to download files from a folder outside of the site directory would go along very nicely with an upload feature like this. I believe there is a version of that already being discussed on another feature request thread.

Any news on this @George? Is there a chance this will be implemented anytime soon? As a BIG fan and user of DO Spaces this would be a major addition to the Wappler feature list in my opinion and I am sure I am not the only one that thinks so!! :slight_smile: :raised_hands:

Another feature request here… Upload Files to API via Server Connect

Yes, yes, yes…

I am going to need S3 integration in the next month at the latest and will have to write my own PHP otherwise…

… Am just leaving big gaps in my app where files are used in the hope this will happen in Wappler asap!

Any update on this? Using a number of components from the AWS ecosystem, easy S3 would be a great start.

3 Likes

Also asking if any update here?

3 Likes

Any update on S3 upload ?

The main issue I see here is what approach to follow at the beginning?

a) Less services, more server models
b) More services, fewer server models

There are out there good libraries that abstract as much as possible Cloud providers APIs. But are tied to certain programming language.

So if you chose nodejs you could leverage libraries like: pkgcloud, flydrive or nodecloud

There are also libraries for php and asp out there but that would require more time to maybe get out there a specific connector.

I think also an important design decision is where exactly the upload takes place.

Currently you have a form with upload on it that just upload to your server connect action and process the file on your server.

But now with an external upload we have two choices:

  1. Upload from the form straight to S3, retrieve the uploaded success token/path and then repost the form you your own server connect action with the upload full url as entry. This will result in single file upload, but we will have to update the whole form posting logic in app connect to handle such case.

  2. Upload the form to your server connect first, with the file upload and then from your server repost it to the external s3. This will result in double file upload and also on Linder running of the server action as it needs to upload again. But we don’t need to change the upload form process at the client as it stays the same.

So ideally we would like to choose solution 1 but not sure if it will cover all possible upload cases.

Also there is a need for upload/post of server side files to external api services which will be covered with solution 2, but also have the same troubles as long running server side actions due to upload

@patrick

2 Likes

Solution 1 will not cover all …but for instance I use wasabi…wich have a full S3 compatibility…and more and more behave like this …

One of the most common use cases is image processing which Wappler currently implements server-side(sharp for node) and it doesn’t handle url load.

But as I believe there is a request for a client image processing component it would eventually have to integrate with client-side cloud upload.

But yes, 1 seems to be the best option as it will save on server resources and bandwidth.

1 Like

Option 1 would get my vote.

1 Like

Option 1 for me too.

1 Like

option 1

1 Like

Option 1

1 Like