spatie / medialibrary.pro

The source code of medialibrary.pro
https://medialibrary.pro
36 stars 9 forks source link

Setting file extension using addFromMediaLibraryRequest #52

Closed joostvanhoof closed 10 months ago

joostvanhoof commented 1 year ago

Looks like there is no 'Discussion' tab here so posting as an issue, hope that's OK.

Quick question: how can I set the file extension in usingFileName in this case?

$model->addFromMediaLibraryRequest($request->photos)
  ->usingName(str($request->title)->slug().'-'.str()->random(8))
  ->usingFileName(str($request->title)->slug().'-'.str()->random(8))
  ->toMediaCollection('photos');
spatie-bot commented 10 months ago

Dear contributor,

because this issue seems to be inactive for quite some time now, I've automatically closed it. If you feel this issue deserves some attention from my human colleagues feel free to reopen it.