Im completely new to django, im working on a task to upload a text file from my local storage into server and access that file on my website from the server. Any guidance in that regard would be helpful.
I have a REST API and i need to extract data from the API to a CSV file . Please let me know how we can do this in the Informatica cloud.
I am able to view data through postman.
I'm using Djangae, with Google Cloud Storage as my storage backend. I'd like to know how I can set a default ImageField value and have it actually be processed by the upload mechanism and sent to the cloud. I could manually upload the file myself using a signal if the user didn't provide an image, but it'd be nice to find a simpler solution.
Environment:
Djangae 0.9.11
Django 1.11.20
Python 2.7
I have a Django web project that is using Amazon S3 for media files. The file upload is happening async direct from the browser.
I need to create some thumbnail images for each file that is uploaded. I found a tutorial for how to do this using AWS Lambda (which I've never used before) but seems like the future of web.
The only issue I am trying to figure out in my head is: how I will update my database back on the django web server with the information for the newly created thumbnail images? I intend to create a new database model (thumbnails) that will store the URL and tie the thumbmail to the main image information.
The only thing I have come up with is to expose a url on my web app to accept HTTP requests (assuming lambda can send HTTP requests). So when the lambda function completes a thumbnail image, it will send the request to my web app with the information for the newly created thumbnail image using POST or PUT.
The thing I don't like about this approach is that it won't work when developing locally. Does anyone have any experience using Lambda to create thumbnails and then communicating back with your web server which differs from my proposed plan?
My web application will host full size photos on Amazon S3 and we use S3 as our media server. We also allow the users to download the full-size photos. Our web server is on a different hosting company. On our web application, how can we force a File Download dialog box instead of showing the photo in browser directly from an Amazon S3 URL? For example, the image url could be "http://my.s3.amazonaws.com/12345.jpg"
One solution would be to download the image to our web server which is running Django, and then force a file download dialog, but will cost double bandwidth and double the download time as well.
Thanks!
See if you can get S3 to specify the content type of the files as application/octet-stream.
I have just verified this. In the AWS management console you can select a file, click on Properties, select the Metadata tab and then set the Content-Type to "binary/octet-stream". If it's e.g. image/jpeg it will display in the browser. If it's changed to binary/octet-stream it forces the browser to download it instead.