Сделал нормальное имя качаемого файла
This commit is contained in:
		
							parent
							
								
									181dc108c1
								
							
						
					
					
						commit
						3c72edffa3
					
				|  | @ -18,6 +18,7 @@ public function index(Request $request) | ||||||
|             Options::create() |             Options::create() | ||||||
|                 ->downloadPath(env('PATH_TO_DOWNLOAD')) |                 ->downloadPath(env('PATH_TO_DOWNLOAD')) | ||||||
|                 ->url($url) |                 ->url($url) | ||||||
|  |                 ->output("%(title)s.%(ext)s_dhaverd_%(id)s") | ||||||
|                 ->format('bestvideo[ext=mp4]+bestaudio[ext=m4a]/bestvideo+bestaudio') |                 ->format('bestvideo[ext=mp4]+bestaudio[ext=m4a]/bestvideo+bestaudio') | ||||||
|                 ->mergeOutputFormat('mp4') |                 ->mergeOutputFormat('mp4') | ||||||
|         ); |         ); | ||||||
|  |  | ||||||
|  | @ -12,7 +12,7 @@ | ||||||
|                     <v-label v-if="error" class="text-wrap text-red mr-5 ml-5">Contact me on Telegram: <span class="tg-link"><a class="tg-link" target="_blank" href="https://t.me/Dhaverd">@Dhaverd</a></span></v-label> |                     <v-label v-if="error" class="text-wrap text-red mr-5 ml-5">Contact me on Telegram: <span class="tg-link"><a class="tg-link" target="_blank" href="https://t.me/Dhaverd">@Dhaverd</a></span></v-label> | ||||||
|                     <div class="d-flex align-center justify-center h-auto" :class="isWide ? '' : 'flex-column'"> |                     <div class="d-flex align-center justify-center h-auto" :class="isWide ? '' : 'flex-column'"> | ||||||
|                         <v-btn class="mt-3 mb-3 mr-5 ml-5" :class="isWide ? '' : 'w-75'" variant="elevated" color="blue" @click="startDownload">Найти</v-btn> |                         <v-btn class="mt-3 mb-3 mr-5 ml-5" :class="isWide ? '' : 'w-75'" variant="elevated" color="blue" @click="startDownload">Найти</v-btn> | ||||||
|                         <v-btn v-if="downloadAvailable" :href="downloadLink" target="_blank" class="mt-3 mb-3 mr-5 ml-5" :class="isWide ? '' : 'w-75'" variant="elevated" color="blue">Скачать</v-btn> |                         <v-btn v-if="downloadAvailable" :href="downloadLink" :download="downloadFileName" target="_blank" class="mt-3 mb-3 mr-5 ml-5" :class="isWide ? '' : 'w-75'" variant="elevated" color="blue">Скачать</v-btn> | ||||||
|                     </div> |                     </div> | ||||||
|                     <div class="d-flex justify-end align-end flex-grow-1 w-100 ml-5 mr-5"> |                     <div class="d-flex justify-end align-end flex-grow-1 w-100 ml-5 mr-5"> | ||||||
|                         <v-label>BETA</v-label> |                         <v-label>BETA</v-label> | ||||||
|  | @ -34,6 +34,7 @@ export default { | ||||||
| 	    fetching: ref(false), | 	    fetching: ref(false), | ||||||
|         downloadAvailable: ref(false), |         downloadAvailable: ref(false), | ||||||
|         downloadLink: '', |         downloadLink: '', | ||||||
|  |         downloadFileName: '', | ||||||
|         hint: ref(''), |         hint: ref(''), | ||||||
|         error: ref(false), |         error: ref(false), | ||||||
|         errorText: ref(''), |         errorText: ref(''), | ||||||
|  | @ -56,6 +57,7 @@ export default { | ||||||
|                 } else if (responce.data.link){ |                 } else if (responce.data.link){ | ||||||
|                     this.downloadAvailable = true; |                     this.downloadAvailable = true; | ||||||
|                     this.downloadLink = `/api/v1/file/download/${responce.data.link}`; |                     this.downloadLink = `/api/v1/file/download/${responce.data.link}`; | ||||||
|  |                     this.downloadFileName = responce.data.link.split('_dhaverd_')[0]; | ||||||
|                 } |                 } | ||||||
|             }).catch((error)=>{ |             }).catch((error)=>{ | ||||||
|                 this.fetching = false; |                 this.fetching = false; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue