<p>Updating Asset indexes is pretty coupled to the tool in the Settings portion of the control panel.</p>

<p>But if you wanted to try and duplicate that functionality in a plugin, you could have it listen for the <a href="http://buildwithcraft.com/docs/plugins/events-reference#userSession-onLogin" rel="nofollow">onLogin</a> event to do your business.</p>

CC BY-SA 3.0
2015-03-17T14:17:36.180Z
I'll take a look. It's a shame there isn't a way for assets to detect uploads externally with S3. I'd upload through Craft but these files are over 500MB so it's not reliable enough through a browser.
Andy
CC BY-SA 3.0
2017-09-21T10:42:23.443Z
@Andy did you ever figure this out? I'd like to do the same thing...
James Smith
CC BY-SA 3.0
2015-03-16T23:16:59.183Z
2015-03-16T23:16:59.183Z
Brad Bell
<p>I'm using an assets directory with Amazon S3 and I have to manually update the indexes through the control panel after uploading files externally. Does anyone know if it is possible to do anything custom to do this on login. Or is it possible to set up a URL that could be hit with a cron or manually.</p>

<p>One idea I had failing any of the above would be to do a custom plugin with just a button to make it a bit quicker than the current method through the settings.</p>

<assets><index><s3><reindex>
Update Asset Indexes on Login
# Update Asset Indexes on Login

(Asked by: username_0 on 2015-03-16)

I'm using an assets directory with Amazon S3 and I have to manually update the indexes through the control panel after uploading files externally. Does anyone know if it is possible to do anything custom to do this on login. Or is it possible to set up a URL that could be hit with a cron or manually.

One idea I had failing any of the above would be to do a custom plugin with just a button to make it a bit quicker than the current method through the settings.

**Tags:** assets, index, s3, reindex


---

## 1 answers

### Answer by username_1 on 2015-03-16. Score: 1

Updating Asset indexes is pretty coupled to the tool in the Settings portion of the control panel.

But if you wanted to try and duplicate that functionality in a plugin, you could have it listen for the [onLogin](http://buildwithcraft.com/docs/plugins/events-reference#userSession-onLogin) event to do your business.

> **Comments:**
> **username_0**: I'll take a look. It's a shame there isn't a way for assets to detect uploads externally with S3. I'd upload through Craft but these files are over 500MB so it's not reliable enough through a browser.  
> **username_2**: @username_0 did you ever figure this out? I'd like to do the same thing...  

---

