[{"data":1,"prerenderedAt":542,"buildId":543},["ShallowReactive",2],{"\u002Fautomations\u002Fintake":3,"\u002Fautomations\u002Fintake-surround":462,"navigation":474},{"id":4,"title":5,"body":6,"description":453,"extension":454,"meta":455,"navigation":456,"path":458,"seo":459,"stem":460,"__hash__":461},"docs\u002F2.automations\u002F07.intake.md","Upload intake",{"type":7,"value":8,"toc":433},"minimark",[9,22,25,30,106,110,124,146,154,159,211,222,225,240,289,300,306,312,316,321,350,354,369,393,397,426],[10,11,12,13,17,18,21],"p",{},"An ",[14,15,16],"strong",{},"intake workflow"," runs on an upload between receiving it and saving it. Its steps work on the uploaded content (strip metadata, crop, resize, convert, compress), and a ",[14,19,20],{},"Save file"," step puts the result in your library. Until that happens, the upload isn't in your library and its links don't serve the unprocessed original.",[10,23,24],{},"Use intake when the file you keep should be different from the file you uploaded: screenshots without EXIF data, images scaled down to a sensible size, everything converted to WebP.",[26,27,29],"h2",{"id":28},"how-an-upload-goes-through-intake","How an upload goes through intake",[31,32,34,39,48,52,59,63,84,88,95],"steps",{"level":33},"4",[35,36,38],"h4",{"id":37},"the-upload-arrives","The upload arrives",[10,40,41,42,47],{},"Tessra receives the file, detects its type from its bytes and works out its size, dimensions and date taken. It then picks the intake workflow for the upload (see ",[43,44,46],"a",{"href":45},"#choosing-a-workflow","Choosing a workflow",").",[35,49,51],{"id":50},"links-are-reserved","Links are reserved",[10,53,54,55,58],{},"Tessra reserves the file's id, its links and, if the upload asked for one, its share link, and answers the upload straight away. ShareX gets its links as usual. These links ",[14,56,57],{},"never change",", whatever happens next.",[35,60,62],{"id":61},"the-workflow-runs","The workflow runs",[10,64,65,66,70,71,75,76,79,80,83],{},"While it runs, the file is ",[67,68,69],"em",{},"pending",". It isn't listed in Files, search or folder counts. Its share page shows a processing page that refreshes itself, and its raw link waits up to 20 seconds before answering ",[72,73,74],"code",{},"503"," with a ",[67,77,78],{},"Retry-After"," header. In the browser, the upload queue shows the file as ",[67,81,82],{},"Processing",".",[35,85,87],{"id":86},"save-file-commits-it","Save file commits it",[10,89,90,91,94],{},"A Save file step with ",[14,92,93],{},"Save as the upload"," turned on stores its content as the reserved file. From that moment the links serve the saved content, and the file appears in your library.",[10,96,97,98,102,103,83],{},"If the run ends without saving it, the upload goes to ",[43,99,101],{"href":100},"\u002Fautomations\u002Fquarantine","quarantine"," (or follows the failure policy you chose) and its links answer ",[72,104,105],{},"404",[26,107,109],{"id":108},"creating-an-intake-workflow","Creating an intake workflow",[10,111,112,113,116,117,120,121,123],{},"Open ",[14,114,115],{},"Automations",", click ",[14,118,119],{},"New workflow"," and choose ",[14,122,5],{}," as the kind. A new intake workflow starts with two steps already connected:",[125,126,127,134],"ul",{},[128,129,130,133],"li",{},[14,131,132],{},"File received",", the trigger.",[128,135,136,138,139,142,143,145],{},[14,137,20],{},", with ",[14,140,141],{},"Content"," reading the upload and ",[14,144,93],{}," turned on.",[10,147,148,149,153],{},"As it stands, this saves every upload unchanged, so it's a starting point. Insert steps between the two to change the content. The ",[43,150,152],{"href":151},"\u002Fautomations\u002Fguides\u002Fcompress-uploads","Compress and resize uploads"," guide walks through it.",[155,156,158],"h3",{"id":157},"file-received-filters","File received filters",[160,161,162,175],"table",{},[163,164,165],"thead",{},[166,167,168,172],"tr",{},[169,170,171],"th",{},"Setting",[169,173,174],{},"Effect",[176,177,178,195,203],"tbody",{},[166,179,180,184],{},[181,182,183],"td",{},"File types",[181,185,186,187,190,191,194],{},"MIME types such as ",[72,188,189],{},"image\u002Fpng"," or ",[72,192,193],{},"image\u002F*",". Empty means every file.",[166,196,197,200],{},[181,198,199],{},"Largest size (MB)",[181,201,202],{},"Larger uploads don't match. Empty means any size.",[166,204,205,208],{},[181,206,207],{},"Tokens",[181,209,210],{},"Only uploads made with these API tokens, when the workflow is picked automatically. Empty means any upload.",[10,212,213,214,217,218,221],{},"The trigger provides ",[72,215,216],{},"trigger.content"," (the received content, with its name, type, size, dimensions, SHA-256 and received date) and ",[72,219,220],{},"trigger.source"," (where it came from: the web app or the API, and which token).",[26,223,46],{"id":224},"choosing-a-workflow",[10,226,227,228,231,232,235,236,239],{},"Each API token has an ",[14,229,230],{},"upload intake"," setting. Open ",[14,233,234],{},"Settings › API tokens"," and click ",[14,237,238],{},"Intake"," on a token:",[160,241,242,252],{},[163,243,244],{},[166,245,246,249],{},[169,247,248],{},"Option",[169,250,251],{},"Uploads with this token",[176,253,254,265,279],{},[166,255,256,262],{},[181,257,258,261],{},[14,259,260],{},"Automatic"," (default)",[181,263,264],{},"Go through the first enabled intake workflow whose trigger accepts them, oldest workflow first. If none does, they're saved as they are.",[166,266,267,272],{},[181,268,269],{},[14,270,271],{},"A specific workflow",[181,273,274,275,278],{},"Always go through that workflow. If it's turned off, deleted or not published, or its trigger doesn't accept the upload, ",[14,276,277],{},"the upload is refused"," and nothing is stored.",[166,280,281,286],{},[181,282,283],{},[14,284,285],{},"No workflow",[181,287,288],{},"Are saved as they are, without intake.",[10,290,291,292,295,296,299],{},"A specific workflow is never silently skipped. When an upload is refused, ShareX shows the error: ",[72,293,294],{},"intake_unavailable"," (the workflow can't run) or ",[72,297,298],{},"intake_rejected"," (its trigger filters don't accept the file).",[10,301,302,305],{},[14,303,304],{},"Wait for processing"," (0 to 60 seconds) makes uploads with this token wait for the workflow to save the file before answering. With 0, the default, the upload answers at once and the links start working when the file is saved. ShareX users may like a few seconds here, so the link they paste already works.",[10,307,308,309,311],{},"Uploads from the web app always use ",[14,310,260],{},", with no wait.",[26,313,315],{"id":314},"save-file-and-the-upload","Save file and the upload",[10,317,318,320],{},[14,319,93],{}," is what makes an intake workflow work. A Save file step with it turned on commits its content as the upload's reserved file. Without it, Save file creates a separate, new file.",[125,322,323,337,340],{},[128,324,325,328,329,332,333,336],{},[14,326,327],{},"Every path through the workflow must save the upload once."," Validation reports ",[72,330,331],{},"primary_save_missing"," when no step saves it, and ",[72,334,335],{},"primary_save_conflict"," when two could both run in one run. Two Save file steps that save the upload are fine on different branches of the same Condition or Switch.",[128,338,339],{},"A saved upload keeps the folder it was uploaded to and its reserved share link, unless the step sets a folder or makes its own link.",[128,341,342,343,345,346,349],{},"You can add more Save file steps without ",[14,344,93],{}," to keep extra copies, such as the untouched original in an ",[67,347,348],{},"Originals"," folder.",[155,351,353],{"id":352},"steps-that-change-the-file","Steps that change the file",[10,355,356,357,360,361,364,365,368],{},"Steps that change a library file (Rename, Add tags, Move to folder, Create share link) act on ",[14,358,359],{},"the run's file"," by default. In an intake run, that file doesn't exist until the upload is saved, so those steps must come ",[14,362,363],{},"after"," the Save file step that saves the upload. Validation reports ",[72,366,367],{},"target_pending"," otherwise.",[10,370,371,372,375,376,375,379,375,382,375,385,388,389,392],{},"Usually you don't need them: Save file has its own ",[14,373,374],{},"Name",", ",[14,377,378],{},"Folder",[14,380,381],{},"Subfolders",[14,383,384],{},"Tags",[14,386,387],{},"Tag names"," and ",[14,390,391],{},"Create a share link"," settings.",[26,394,396],{"id":395},"limits","Limits",[125,398,399,406,413,423],{},[128,400,401,402,405],{},"An intake run has ",[14,403,404],{},"1 hour"," from upload to finish. A run still going after that fails.",[128,407,408,409,412],{},"A run can make at most ",[14,410,411],{},"10 working files",", together at most 4 times the upload's size (with a floor of 64 MiB).",[128,414,415,416,419,420,83],{},"Received uploads, working files and quarantine share a staging area (10 GiB on the server, 2 GiB per user by default). When it's full, uploads are refused with ",[72,417,418],{},"507 storage_full",". When your quarantine is full (1 GiB), uploads to workflows that quarantine failures are refused with ",[72,421,422],{},"507 quarantine_full",[128,424,425],{},"Intake runs are worked on before library runs, but library runs always get at least a quarter of the turns.",[10,427,428,429,83],{},"Administrators can change these limits in the server configuration; see ",[43,430,432],{"href":431},"\u002Fautomations\u002Freference\u002Flimits","Limits and errors",{"title":434,"searchDepth":435,"depth":436,"links":437},"",2,3,[438,445,448,449,452],{"id":28,"depth":435,"text":29,"children":439},[440,442,443,444],{"id":37,"depth":441,"text":38},4,{"id":50,"depth":441,"text":51},{"id":61,"depth":441,"text":62},{"id":86,"depth":441,"text":87},{"id":108,"depth":435,"text":109,"children":446},[447],{"id":157,"depth":436,"text":158},{"id":224,"depth":435,"text":46},{"id":314,"depth":435,"text":315,"children":450},[451],{"id":352,"depth":436,"text":353},{"id":395,"depth":435,"text":396},"Process uploads before they reach your library, and choose which uploads go through which workflow.","md",{},{"icon":457},"i-lucide-inbox","\u002Fautomations\u002Fintake",{"title":5,"description":453},"2.automations\u002F07.intake","NTPO_nUd4T7zQpUeZUYmaUFU3fPDBzn60HpfAZb59Tw",[463,469],{"title":464,"path":465,"stem":466,"description":467,"icon":468,"children":-1},"Testing","\u002Fautomations\u002Ftesting","2.automations\u002F06.testing","Run a draft on a real file and see what every step would do, without changing your library.","i-lucide-flask-conical",{"title":470,"path":100,"stem":471,"description":472,"icon":473,"children":-1},"Quarantine and failures","2.automations\u002F08.quarantine","What happens to an upload when its intake workflow fails, and how to retry, release or delete it.","i-lucide-shield-alert",[475,484],{"title":476,"path":477,"stem":478,"children":479,"icon":483},"Getting started","\u002Fgetting-started","1.getting-started\u002F1.index",[480],{"title":481,"path":477,"stem":478,"icon":482},"Introduction","i-lucide-house",false,{"title":115,"path":485,"stem":486,"children":487,"icon":483},"\u002Fautomations","2.automations\u002F01.index",[488,491,496,501,506,511,512,513,514,519,528],{"title":489,"path":485,"stem":486,"icon":490},"Overview","i-lucide-workflow",{"title":492,"path":493,"stem":494,"icon":495},"Your first workflow","\u002Fautomations\u002Ffirst-workflow","2.automations\u002F02.first-workflow","i-lucide-rocket",{"title":497,"path":498,"stem":499,"icon":500},"The editor","\u002Fautomations\u002Feditor","2.automations\u002F03.editor","i-lucide-mouse-pointer-2",{"title":502,"path":503,"stem":504,"icon":505},"Values and templates","\u002Fautomations\u002Fvalues","2.automations\u002F04.values","i-lucide-braces",{"title":507,"path":508,"stem":509,"icon":510},"Conditions and branching","\u002Fautomations\u002Fbranching","2.automations\u002F05.branching","i-lucide-split",{"title":464,"path":465,"stem":466,"icon":468},{"title":5,"path":458,"stem":460,"icon":457},{"title":470,"path":100,"stem":471,"icon":473},{"title":515,"path":516,"stem":517,"icon":518},"Runs and history","\u002Fautomations\u002Fruns","2.automations\u002F09.runs","i-lucide-history",{"title":520,"icon":521,"path":522,"stem":523,"children":524,"page":483},"Guides","i-lucide-book-open","\u002Fautomations\u002Fguides","2.automations\u002F10.guides",[525],{"title":152,"path":151,"stem":526,"icon":527},"2.automations\u002F10.guides\u002F1.compress-uploads","i-lucide-file-image",{"title":529,"icon":530,"path":531,"stem":532,"children":533,"page":483},"Reference","i-lucide-library","\u002Fautomations\u002Freference","2.automations\u002F11.reference",[534,539],{"title":535,"path":536,"stem":537,"icon":538},"Step reference","\u002Fautomations\u002Freference\u002Fsteps","2.automations\u002F11.reference\u002F1.steps","i-lucide-blocks",{"title":432,"path":431,"stem":540,"icon":541},"2.automations\u002F11.reference\u002F2.limits","i-lucide-gauge",1796146074618,"7701d6d7-f1dc-48af-abe7-a8319dcc587e"]