fileUpload component - set custom name for upload file #223
-
Using: JDK8/PDF 6.1 I have a situation where a large number of users can upload dozens of files (pictures, mov files, office files) by selection or drag-and-drop. There's no file size limit. Multiple and concurrent are also enabled. The temporary file name on the server is of course randomized and doesn't indicate to the server team who the user is that started the upload. Some of the larger file uploads (700 MB+) cause the server itself to hang (we're still investigating on that count) forcing a restart. Is there anyway to declare a call-back function that can create a custom name for the temporary file on the target server while preserving the original name when the user code is called to deal with the uploaded file? Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
cc @Rapster cc @jepsar as they have a done a lot of the FileUpload work. |
Beta Was this translation helpful? Give feedback.
-
Had a feeling. Ok. Do you think it may be possible to override the upload process? Via servlet maybe? Or is that entirely up to the container? I found the @MultipartConfig doc but even if I define a servlet, I take it there's no way to tell PF to use it? |
Beta Was this translation helpful? Give feedback.
I don't think PF can do something about this, besides chunks upload and content verification, FileUpload does not create temp file, your servlet container will. When we create a UploadFile, all we can do is to get the inputstream (that most of the time will come from a File that your servlet container created). In a few words, PF has no control over filenaming