ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Attachment save to amazon s3, azure blob etc


#1

Hello I was thinking to save attachments to amazon s3 its cheaper to host large amount of files to amazon s3. Its hard to scale disk space in virtual machine like digitalocean etc. so better host it to amazon s3 or azure. Would this be easy to develop or its needs a lot of work?


#2

We started this project, hence file saving is “hookable”

Check this: https://github.com/frappe/frappe/blob/develop/frappe/utils/file_manager.py#L158

All you need to do is return the filename and url like save_file_on_filesystem


#3

@rmehta wow thats cool. I try to create an app/plugin for amazon s3


#4

@ccfiel good luck! I’ve been wanting to do something similar with google drive API / Google cloud storage.

We currently use google drive and just attach the URL’s so nothing is lost, we control who see’s what and in the event ERPNext crashes google drive will still be there (hopefully)


#5

@ccfiel Any chance your app/plugin is open source?


#6

its open source


Selective external storage
#7

#8

This is great! What happen there are existing files already before I installed the app? would it migrate the existing files to s3?


#9

Its not there right now.I can add that feature, where after you install, a button to migrate all the existing files to s3.


#10

Thans would be great! Thanks for this great app!


#11

Now there is a button on the migrate the existing files to s3 right after installing the app.


#12

Great! :smiley: I wll try it! Thanks a lot!


#13

@Ramesh_Ravi I installed the app I did not see any migration button. See screenshot

Just curious why the S3 Attachment Settings is not set to single? You can add multiple record and how do i know if my setting is correct?

Cheers,
Chris


#14

@Ramesh_Ravi think you have push the update only in develop branch not in your master.


#15

sorry for the delayed response. Yeah its pushed to develop…with the single doctype and migrate button. Il merge it with master after i test it.


#16

Hi @Ramesh_Ravi

This is awesome! Any chance of getting it merged to the core just like the S3 Backup?

Cheers!