italoborges's avatar

Change filename after upload Laravel Stapler

I'm using the Stapler Lib to make the image uploads. The image's filename is generated by image description field. After the upload, the user can change the image description and after that, I need to update the image filename. Is there a way to do this using the Stapler Lib?

I have been thinking in something like this:

$product->image->instanceWrite('file_name', 'other_description.jpg');
$product->image->reprocess();
0 likes
3 replies
leandromatos's avatar

I think this issue can help you ;)

https: //github.com/CodeSleeve/stapler/issues/34

italoborges's avatar

Thanks for your help, Leandro. This thread doesn't help me because their problems is about how to change the name before the upload occurs. My problem is how I can change the name after de upload has made.

If the user, for SEO proposed, could change the file name based on a input field description.

Please or to participate in this conversation.