upload

Django Ajax Image submit

廉价感情. 提交于 2021-01-29 14:58:34
问题 I am trying to upload and save an image file using Django and respond the image itself to use in ongoing javascript functions. The problem is that the image doesn't get saved, the request.FILES is empty. When using request.body, I can see that there is not the actual file path, but a C://fakepath. Because I want the uploaded image to save immediately, I do the post using a jquery ajax call, the data is then saved creating a new Object, then the function should return a success, which it does.

upload 20 mb file to 3rd Party services from Salesforce

痴心易碎 提交于 2021-01-29 14:40:29
问题 Trying to upload files upto 20 MB from Salesforce Visualforce page to another server. But when I select a file using apex:inputFile , it says file limit is 10 MB. Any idea about this ? Already tried with transient variable 回答1: Normal apex code has 6 MB heap (memory) size limit. Asynchronous apex (batch jobs, @future methods) have 12 and custom-coded inbound email handlers have 36. You won't be able to push more than that from server-side code. Even less if the file is binary and you might

Does the free tier of Heroku apps support file upload?

耗尽温柔 提交于 2021-01-29 10:42:00
问题 I am testing out a MEAN stack application. I have a Node.js backend which handles file upload (via fs/multer ). However I'm receiving a 503 error when trying to hit it in production. Locally everything is working fine. I am using Heroku's free tier; is that tier locked to not allow file upload? The upload I'm trying currently (have tried several) is only 36kb ( .png ). Went through my logs and found the 503- 2018-10-26T20:39:24.352297+00:00 heroku[router]: at=error code=H13 desc="Connection

Uploading file to s3 using presigned-URL

岁酱吖の 提交于 2021-01-29 09:41:11
问题 I'm trying to upload a file in my s3 bucket with a aws presigned-URL. Here is my js function function UploadObjectUsingPresignedURL() { var file = document.getElementById('customFile').files[0]; console.log(file); var xhr = new XMLHttpRequest(); xhr.open('PUT', 'hereMyPresignedURL', true); //xhr.setRequestHeader('Content-Type', 'image/jpeg'); xhr.onload = () => { if (xhr.status === 200) { console.log('Uploaded data successfully'); } }; xhr.onerror = () => { console.log('Nope') }; xhr.send

Node.js Cloud Function - Stream CSV data directly to Google Cloud Storage file

生来就可爱ヽ(ⅴ<●) 提交于 2021-01-29 07:49:01
问题 I have a script that can call a RESTful API and retrieve CSV data from a report in chunks. I'm able to concatenate, parse, and display this data in the console. I am also able to write this CSV data to a local file and store it. What I am trying to figure out is how to skip creating a file to store this data before uploading it to GCS and instead transfer it directly into Google Cloud Storage to save as a file. Since I am trying to make this a serverless cloud function, I am trying to stream

Google Cloud Storage | PHP | Uploaded files are at 0 Bytes

只愿长相守 提交于 2021-01-29 07:31:43
问题 I am using a Codeigniter application and trying to provide access for users to upload files. the server is setup on a Google Compute Engine VM running CentOS 7 and Apache 2, I am trying to use Google Cloud Storage for user upload. Currently when I upload files only the file names are being uploaded into GCS Bucket with the file size as 0 bytes. My Frontend Code: <body> <form action="/includes/includes_gc/do_upload" class="dropzone" id="pfUploads" enctype="multipart/form-data"> </form> <script

Vimeo API: Can't upload video - “No user credentials were provided.” (8003)

痞子三分冷 提交于 2021-01-29 06:31:57
问题 I'm trying to upload a video from my ReactJS application to Vimeo but I'm getting a "No user credentials were provided." error (8003). I followed this guide from the Vimeo API: https://developer.vimeo.com/api/upload/videos#form-approach My code (for the first step of uploading a video): const accessToken = "74a218e620507395c78219ab9421639c"; const size = form.file.size; // size of video in bytes axios .post("https://api.vimeo.com/me/videos", { headers: { Accept: "application/vnd.vimeo.*+json

Laravel upload multiple files

本小妞迷上赌 提交于 2021-01-29 05:40:19
问题 I'm building a gallery with multiple files functionality. So far I'm having two issues, but let's paste my code first. Controller: public function store(Request $request) { $gallery = new GalleryImage(); if($request->hasFile('image')) { $images = $request->file('image'); foreach($images as $image) { $path = $image->getClientOriginalName(); $name = time() . '-' . $path; $gallery->image = $image->move(public_path().'/uploads/temp/', $name); //$gallery->image = $request->file('image')->storeAs(

Multer image upload in Nodejs and Express

谁说我不能喝 提交于 2021-01-27 18:41:11
问题 I've been trying for days to upload an image using Multer. This is how far I got. I tried multiple things, and can't seem to make it work. I don't know how to use Multer to upload an image in my createUser function in the format shown below. My ' server.js ' file: var express = require('express'); var multer = require('multer'); var upload = multer({dest: 'uploads/'}); var router = require('./app/routes'); var bodyParser = require('body-parser'); var mongoose = require('mongoose'); var

PHP directory error - open_basedir restriction in effect

坚强是说给别人听的谎言 提交于 2021-01-23 11:07:48
问题 I've got some PHP code that'll create a new file in a set directory: $target_path = "reports/" . basename($Report_Filename) . ".php"; if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { /* code here */ } It was working perfectly, and has done for some years now, unfortunately we've just moved across to a new server, and I'm now getting this error: [15-Jul-2010 16:15:48] PHP Warning: Unknown: open_basedir restriction in effect. File(C:\Windows\TEMP\) is not within the