unclecheese / silverstripe-kickassets

KickAssets module for asset management in SilverStripe 3
GNU General Public License v2.0
47 stars 22 forks source link

Overwriting file option #27

Open youpixxl opened 8 years ago

youpixxl commented 8 years ago

Hi,

First thanks for this great plugin ! I would like to know if there is a way to configure an "overwrite file" option when one upload already existing file name ? It seems the standard config as below does not work properly with Kickassets

replace files instead of versioning

Upload: replaceFile: true

show an overwrite warning

UploadField: defaultConfig: overwriteWarning: true

Thanks again.

unclecheese commented 8 years ago

Thanks for this. Replacing files actually almost made it into the first release, but I decided to cut it at the last minute as it was becoming more complicated than expected. The way it will work is that the edit view of a file will expose an upload field / dropzone that will allow you to replace the file itself, preserving all the metadata.

I don't like the idea of throwing overwrite warnings the way that UploadField does. I find that's too closely coupled with your local filesystem, and the app should always assume you want a new file, unless you explicitly follow steps to replace it.

youpixxl commented 8 years ago

Thanks a lot for your reply. Then we are looking forward for your next release !

filiplikavcan commented 8 years ago

This feature would be very helpful. The only way how to replace a file is to upload it manually using FTP. It is fine to delete/upload new file in the CMS if the file is linked with just one data object. It is not possible if the file is linked with multiple data objects.

unclecheese commented 8 years ago

Yup. It was a nice feature in KickAssets 2, and it almost made it into this release, but it was buggy so I removed it. Will revisit it for sure.

On Fri, Jun 17, 2016 at 23:52, filiplikavcan notifications@github.com wrote: This feature would be very helpful. The only way how to replace a file is to upload it manually using FTP. It is fine to delete/upload new in the CMS if the file is linked with just one data object. It is not possible if the file is linked with multiple data objects.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub [https://github.com/unclecheese/silverstripe-kickassets/issues/27#issuecomment-226750179] , or mute the thread [https://github.com/notifications/unsubscribe/AAn9LAp_57PNrsG9IWRdBj8aiw0YpEerks5qMoqDgaJpZM4GuBR1] .

ggreggless commented 8 years ago

@unclecheese any chance you could make the source code available for where you got with overwriting? This is somewhat of a deal-breaker for a client of mine so I'm either going to add it myself or hopefully attempt to sort out the bugs which you were facing.