# How to avoid uploading attachments multiple times in a migration

**URL:** <https://meta.discourse.org/t/how-to-avoid-uploading-attachments-multiple-times-in-a-migration/70613>\
**Category:** Development\
**Created:** [2017 年 9 月 22 日午後 10:35 UTC](https://meta.discourse.org/t/how-to-avoid-uploading-attachments-multiple-times-in-a-migration/70613 "2017-09-22T22:35:48Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)\
**Post date:** [2017 年 9 月 25 日午後 4:20 UTC](https://meta.discourse.org/t/how-to-avoid-uploading-attachments-multiple-times-in-a-migration/70613/3 "2017-09-25T16:20:59Z")

</div>

> [@fefrei](#):
>
> Since storage is based on an SHA checksum, this won’t duplicate the files

DOH! So **that’s** why those checksums are in the model?!?!?! 😊

In that case, my problem is only making sure that I don’t add links to the un-linked attachments multiple times.

Thanks very much.

---

_[View the full topic](https://meta.discourse.org/t/how-to-avoid-uploading-attachments-multiple-times-in-a-migration/70613)._
