How to hide "Choose A File" & "Upload"

I’m using this php script that uploads videos.
In the browser it shows …/uploader.php
and on the page it shows:

I’m trying to figure out if this can be hidden, so that when a User reaches that page, a test file (stored in a folder on the server) is launched to automatically upload, instead, and the script proceeds as normal.
Any ideas on that will be appreciated. Much thanks.

No you can’t do that.

Thanks for your reply.
So, you’re saying, then, that a modification can’t be made, to add something like 'if no File is chosen, then upload this one"? Or 'if no File is chosen, then use this file, (already)in the destination folder, as the file that goes with this Upload Form submission, when searching for the criteria of this Upload submission?

Also, I see that the uploader file (attached) has some code pertaining to:
“vid_upload_token”. Maybe it would be possible to send this ‘token’ somehow to have the script think a file was uploaded, but no file actually was, yet the Upload Form criteria appears in the search results? I look forward to any additional feedback. Thanks

uploaderPHP.txt (8.8 KB)

which one? The file upload option can only upload files that exist on the user’s computer and only they know what files they have and where they are.

You could have a process run after the form is submitted that substitutes a file already on the server if there isn’t one uploaded.

Thanks for your reply.
Yes, so the first part of the Upload Form looks like this with a “Next” button at the bottom::

So, maybe the “Next” button could be the “Submit” button, and a “process run after the form is submitted that substitutes a file already on the server if there isn’t one uploaded”?

Is that possible?

Currently, what shows after you selected “Next” is this:

It probably already is the submit button as the file upload looks to be a separate page.

So what you do is set a default file as part of the processing of the initial form and then replace it with the uploaded file from the second form if that form gets used.

Thanks for that reply.
Can your expand on “set a default file as part of the processing of the initial form and then replace it with the uploaded file from the second form if that form gets used”, it’s a bit challenging to follow what it is you’re suggesting. Thanks

It is even more challenging to show you how to modify code without seeing the code that is to be modified.

What code do you currently have to process the form once it is submitted?

1 Like

Thanks for your reply.
This is the code:

uploaderPHP.txt (8.8 KB)

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.