![]() ![]() The 'dest' property specifies the location to. Here's the code: var express require ('express'), multer require ('multer'), // Set up the middleware, which automatically handles files uploaded to it. ![]() I appreciate any help anyone can provide. We'll create our /do-upload route, inject a multer middleware instance into it, and then do something when someone tries to upload a file. It seems like there should be a way to get this working that isn’t too crazy. Blobs can represent data that isn't necessarily in a JavaScript-native format. Is it possible to upload to a Nextcloud “File Drop” using curl from a command line? I have tried: curl -T fileToUpload Ĭurl -X PUT -data-binary I have even gone in to Chrome’s developer console, watched a sample file get uploaded and copied the curl command, which does not work, but is something like: curl '' -X PUT -H 'Origin: ' -H 'Accept-Encoding: gzip, deflate, sdch, br' -H 'Accept-Language: en-US,en q=0.8' -H 'Authorization: Basic Z0w4SlM5NDV0UlpiR1pGOg=' -H 'OCS-APIREQUEST: true' -H 'Content-Type: image/jpeg' -H 'Accept: */*' -H 'X-Requested-With: XMLHttpRequest' -H 'Content-Disposition: attachment filename="test_file.jpg"' -H 'Connection: keep-alive' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0 Win64 圆4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/.81 Safari/537.36' -H 'Content-Length: 106717' -compressed If your plugin has no extension for uploading using button,you could consider using another js plugin which uses a button to upload file and combine your original plugin with it,so that your page also has the function to upload with button. The Blob object represents a blob, which is a file-like object of immutable, raw data they can be read as text or binary data, or converted into a ReadableStream so its methods can be used for processing the data. Operating system and version (eg, Ubuntu 16.04): 16.04Īpache or nginx version (eg, Apache 2.4.25): 2.4.18 ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |