#1 August 30, 2017 3:21pm

tsamant
Member
From: Chicago
Registered: May 14, 2015
Posts: 52

Batch-upload into file browser

I am trying to see how feasible/useful it is to do a type of batch upload of images, so they are available from the file-browser admin.

We use amazon S3.

My first guess is that calling BigTreeStorage::store for every image file in question would do the trick. But is this right? Will the image end up in the right folder, and fully usable, and with thumbnails etc?

Best,
Tushar

Offline

#2 August 31, 2017 10:03am

timbuckingham
Administrator
From: Baltimore, MD
Registered: April 2, 2012
Posts: 974

Re: Batch-upload into file browser

BigTreeStorage::store will actually push the file up and give you a URL for it but you'll also need to use the BigTreeAdmin::createResource method to add a database entry for it to show in the file/image browser.

Thumbnail creation isn't in that method either so I'd reference /core/admin/ajax/file-browser/upload.php for how that is done.

Offline

#3 September 5, 2017 2:43pm

tsamant
Member
From: Chicago
Registered: May 14, 2015
Posts: 52

Re: Batch-upload into file browser

Thanks for the clarification, Tim. This is clearly going to be a somewhat long-term project for us; it's good to know what it involves.

Best,
Tushar

Offline

Board footer

Powered by FluxBB

The Discussion Forum is not available on displays of this size.