Upload files? #274
Replies: 3 comments 1 reply
-
puffrfish wrote at May 25 2016 14:18:18 UTC: It is definitely possible but I believe this is not working for you because you're not putting any data into the file, so the PUT request is just creating a blank file with no contents. |
Beta Was this translation helpful? Give feedback.
-
puffrfish wrote at May 25 2016 14:18:18 UTC: This is sort of beyond the scope of this forum, but essentially you need to set more curl options (for example CURLOPT_INFILE) to load in the file data to be sent along with the request. |
Beta Was this translation helpful? Give feedback.
-
puffrfish wrote at May 25 2016 14:18:18 UTC: I will say though that I don't know if this even works and may be the reason it is not documented, as the panel itself does not upload files via PUT, it uses the websocket connection to upload directly from the browser. |
Beta Was this translation helpful? Give feedback.
-
ReduxRedstone wrote at May 25 2016 14:18:18 UTC:
Is there any way to upload a file, or possibly write data to an existing file, using '/file/:file'? When using php I can get a files contents by doing:
and it outputs the contents, which is just "test". When using the code:
it creates a file called "test2.txt" and its contents are "undefined". The page http://scales.pufferpanel.com/docs/serverfilefile doesnt mention being able to do this, so im curious if its possible.
Beta Was this translation helpful? Give feedback.
All reactions