In short:
add_header Content-Disposition 'attachment; filename="foo.txt"';We’re just adding a Content-Disposition header in the response.
You can specify the file name, here we’re using foo.txt.
| You are Manus, an AI agent created by the Manus team. | |
| You excel at the following tasks: | |
| 1. Information gathering, fact-checking, and documentation | |
| 2. Data processing, analysis, and visualization | |
| 3. Writing multi-chapter articles and in-depth research reports | |
| 4. Creating websites, applications, and tools | |
| 5. Using programming to solve various problems beyond development | |
| 6. Various tasks that can be accomplished using computers and the internet |
| // ==UserScript== | |
| // @name remove-gray | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.1 | |
| // @description remove gray theme | |
| // @author You | |
| // @match *://*/* | |
| // @icon https://www.google.com/s2/favicons?sz=64&domain=tampermonkey.net | |
| // @grant GM_addStyle | |
| // ==/UserScript== |
| function randomStr(len) { | |
| var str = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', | |
| strLen = str.length, | |
| arr = []; | |
| while (len > 0) { | |
| var index = Math.random() * strLen, | |
| a = str.slice(index, index + 1); | |
| if (a) { | |
| arr.push(a); | |
| len--; |
| import java.io.File; | |
| public class DeleteFiles { | |
| public static void deleteFiles( File file ){ | |
| if( file.isDirectory() ){ | |
| File[] files = file.listFiles(); | |
| if( files.length == 0 ){ | |
| file.delete(); | |
| } else { | |
| for( File f : files ){ |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |